Git: Syncing fork repo against upstream repo

In case you need to make sure your forked repo is up-to-date with the original repo (i.e. /git/original/HelloWorld vsĀ /git/anton/HelloWorld), here’s what you need to do in your terminal:


$ git remote -v
$ git remote add upstream git@git.url.io:original/HelloWorld.git
$ git remote -v
$ git fetch upstream
$ git checkout master
$ git merge upstream/master
$ git merge upstream/master
Updating ad3aeb1c..3f5ef884
Fast-forward
pom.xml | 5 +-
26 files changed, 139 insertions(+), 578 deletions(-)

Ref: https://help.github.com/articles/syncing-a-fork/

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.