Last Updated: February 25, 2016
·
225
· ridermansb

Sync a git repository

First we need a upstream remote to sync

git remote add upstream https://{{url}}

The url is where you do a fork

Fetch all the branches

git fetch upstream

Go to master branch

git checkout master

Rewrite your master branch

git rebase upstream/master

Update

git push -f origin master