Skip to content

How to keep GitHub Fork Updated (no merge - the right way)

Here is a solution for keeping your fork updated without merge and clean history.

Terminal window
git clone git@github.com:[username]/[repo].git
git remote add upstream git@github.com:[username2]/[repo].git

When something changes in the forked repo

Terminal window
git fetch upstream
git checkout [branch]
git rebase upstream/[branch]