Keep a git fork up to date
- Add the remote upstream to your fork
git remote add upstream git@[server]:[owner]/[remote_repo].git
- Update and merge from upstream to your fork
git fetch upstream && git merge upstream/master && git push
Written by Raúl Raja
Related protips
3 Responses

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.
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#