How to update a forked repo with git

Access to your fork folder

cd whatever

Add the reference to the original remote repo, called upstream:

git remote add upstream https://github.com/whoever/whatever.git

Get all branch from a remote repo:

git fetch upstream

Go to the brach we want to update such as master:

git checkout master

Re-write our master branch with the new commits from the original master branch:

git rebase upstream/master

Finally, to update our remote fork, follow this sentence:

git push -f origin master

Comments

Popular posts from this blog

How to fix Android when developer options are not available for this user

How to install Matlab without GUI

Contiki 3.0 on XM1000