0t6uwa
Last Updated: February 25, 2016
·
857
· 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

456

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

over 1 year ago ·
1624

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

https://gist.github.com/2046776

over 1 year ago ·
1625

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 ·
Filed Under