Git, Forking and Syncing

Written by - Saumya

19 May 2015

There are couple of things to understand before going to the commandline, just remember that we have assumed the name UPSTREAM as the repository, from where we have forked the project and master is our own remote repository where we save our changes. Well, another important thing is to configure the UPSTREAM or simply configure a repository from where we want to sync.

git remote -v
git remote add UPSTREAM https://github.com/ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git

For syncing forked repository, the commands are as below.

git remote -v
git fetch UPSTREAM
git checkout master
git merge UPSTREAM/master
git push origin master

This is a direct tutorial from github.

Happy syncing.