-
Notifications
You must be signed in to change notification settings - Fork 287
Syncing a fork
Fabien Spindler edited this page Oct 20, 2015
·
2 revisions
How to sync a fork of a repository to keep it up-to-date with the upstream repository is explained here.
We recap hereafter the instructions:
-
Open Terminal (for Mac and Linux users) or the command prompt (for Windows users).
-
Change the current working directory to your local project.
-
Fetch the branches and their respective commits from the upstream repository. Commits to
master
will be stored in a local branch,upstream/master
.$ git fetch upstream remote: Counting objects: 57, done. remote: Compressing objects: 100% (47/47), done. remote: Total 57 (delta 22), reused 0 (delta 0), pack-reused 0 Unpacking objects: 100% (57/57), done. From https://github.com/lagadic/visp * [new branch] master -> upstream/master
-
Check out your fork's local
master
branch.$ git checkout master
-
Merge the changes from
upstream/master
into your localmaster
branch. This brings your fork'smaster
branch into sync with the upstream repository, without losing your local changes.$ git merge upstream/master Updating 67afb0d..fc31b59 Fast-forward modules/core/include/visp3/core/vpHistogram.h | 52 ++++++++++--- modules/core/include/visp3/core/vpImage.h | 48 ++++++++++++ modules/core/include/visp3/core/vpMath.h | 144 +++++++++++++++++++++++++++++++++++- modules/core/src/tools/histogram/vpHistogram.cpp | 81 ++++++++++++++++++-- modules/core/test/math/testMath.cpp | 288 +++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 591 insertions(+), 22 deletions(-)
-
To update your fork on GitHub, you must push your changes.
$ git push