Last Updated: February 25, 2016
·
1.011K
· raulraja

Keep a git fork up to date

  1. Add the remote upstream to your fork

git remote add upstream git@[server]:[owner]/[remote_repo].git

  1. Update and merge from upstream to your fork

git fetch upstream && git merge upstream/master && git push

3 Responses
Add your response

You may be interested in git up http://coderwall.com/p/wdpzgw

over 1 year ago ·

I got this alias, which is based on naming conventions.

https://gist.github.com/2046776

over 1 year ago ·

I usually don't bother updating my fork, I just create a new branch:

git fetch upstream && git checkout upstream/master -b new_featrue

and work from there.

over 1 year ago ·