Skip to content
Scott Charlton edited this page Oct 8, 2016 · 6 revisions

###Syncing a repository that was forked to the original repository

See https://help.github.com/articles/syncing-a-fork/, https://help.github.com/articles/configuring-a-remote-for-a-fork/, https://help.github.com/articles/pushing-to-a-remote/

Open Git Bash and cd to local repository

$ cd /c/prepost-gui

If necessary add upstream remote to sync with (original that was forked) (verify using 'git remote -v')

$ git remote add upstream https://github.com/i-RIC/prepost-gui.git

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

Verify that the correct local branch is selected, if not check it out

$ git checkout master

Merge the changes from [upstream/master] into your local [master] branch. This brings your forks [master] branch into sync with the upstream repository, without losing your local changes.

$ git merge upstream/master

Push the changes to your forked repository

$ git push origin master