Sync forks with main repo
Contributing to an open source project? Here what I have been using to keep my fork in sync with the main repo (in this example, I am using the Rails repo):
$ git remote add upstream git://github.com/rails/rails.git
$ git fetch upstream
$ git rebase upstream/master
Boom. Your fork is now in sync with the main repo.
For a faster workflow, you can alias some of these commands in your gitconfig. For example:
[alias]
railsync = fetch upstream && rebase upstream/master
Written by Bryan Mikaelian
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Github
Authors

projectcleverweb
289.2K

jjperezaguinaga
90.23K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#