| | 45 | |
| | 46 | === Staying Current === |
| | 47 | |
| | 48 | The local git repository which you created when you cloned the remote repository has a complete snapshot of development at the time it was cloned. |
| | 49 | You can use this to build the BOINC software, and you can even make local changes to your local copy. |
| | 50 | Meanwhile the BOINC developers will be making changes to the remote repository as they continue working on the software. |
| | 51 | To see what changes have been made there since you cloned the repository you must first "fetch" the changes from that repository. |
| | 52 | These will go into a branch called "origin/master", which is not the current working branch of your repository (which by default will be the "master" branch). |
| | 53 | So to compare your local copy with the remote, follow this example: |
| | 54 | {{{ |
| | 55 | $ cd boinc |
| | 56 | $ git fetch |
| | 57 | $ git diff --name-status master..origin/master |
| | 58 | M client/app.cpp |
| | 59 | M client/app_config.cpp |
| | 60 | M client/client_types.h |
| | 61 | M client/cpu_sched.cpp |
| | 62 | M client/cs_prefs.cpp |
| | 63 | M client/cs_scheduler.cpp |
| | 64 | M client/result.cpp |
| | 65 | M client/result.h |
| | 66 | M client/rr_sim.cpp |
| | 67 | M client/sim.cpp |
| | 68 | M clientgui/MainDocument.cpp |
| | 69 | M doc/versions.inc |
| | 70 | M html/user/get_passwd.php |
| | 71 | M html/user/server_status.php |
| | 72 | M lib/coproc.h |
| | 73 | }}} |
| | 74 | The "--name-status" flag causes only the name and status of differing files to be displayed. |
| | 75 | The "master..origin/master" specification causes the difference to be displayed between your local repository (the "master" branch) and the remote repository (as fetched onto the local "origin/master" branch). |
| | 76 | |
| | 77 | If you wish to update your local branch to match the remote repository then simply use the git "pull" command, |
| | 78 | as in this example: |
| | 79 | {{{ |
| | 80 | $ git pull |
| | 81 | Updating 6790085..2bb3e74 |
| | 82 | Fast-forward |
| | 83 | client/app.cpp | 2 +- |
| | 84 | client/app_config.cpp | 12 ++ |
| | 85 | client/client_types.h | 2 +- |
| | 86 | client/cpu_sched.cpp | 12 +- |
| | 87 | client/cs_prefs.cpp | 5 +- |
| | 88 | client/cs_scheduler.cpp | 15 +- |
| | 89 | client/result.cpp | 7 +- |
| | 90 | client/result.h | 3 + |
| | 91 | client/rr_sim.cpp | 4 +- |
| | 92 | client/sim.cpp | 6 +- |
| | 93 | clientgui/MainDocument.cpp | 12 +- |
| | 94 | doc/versions.inc | 380 ++++++++++++++++++++++---------------------- |
| | 95 | html/user/get_passwd.php | 101 ++++++------ |
| | 96 | html/user/server_status.php | 38 ++++- |
| | 97 | lib/coproc.h | 5 + |
| | 98 | 15 files changed, 332 insertions(+), 272 deletions(-) |
| | 99 | }}} |
| | 100 | You could also use the "git merge" command, which would merge the changes from your local copy of the "origin/master" branch into your local "master" branch. |
| | 101 | The "git pull" command is shorthand for "git fetch" followed immediately by "git merge". |
| | 102 | |
| | 103 | |