List remotes repositories.
git remote -v
Add a new remote upstream repository that will be synced with the fork.
git remote add upstream [email protected]:ORIGINAL_OWNER/ORIGINAL_REPOSITORY.git
We'll update upstream
remote.
git remote set-url upstream [email protected]:ORIGINAL_OWNER/ORIGINAL_REPOSITORY.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
Merge the changes from upstream/master
into your local master
branch.
git merge upstream/master