Skip to content

Instantly share code, notes, and snippets.

@rickbassham
Created December 29, 2020 23:37
Show Gist options
  • Save rickbassham/fea62d8e3b8c36b32bd6eb097c70d402 to your computer and use it in GitHub Desktop.
Save rickbassham/fea62d8e3b8c36b32bd6eb097c70d402 to your computer and use it in GitHub Desktop.
git remote rename origin upstream
git remote add origin https://github.com/user/FORK.git
git checkout -b newFeatureBranch

Whenever you need to update your fork based on the recent evolution of the original repo:

git checkout master
git pull # it pulls from upstream!
git checkout newFeatureBranch
git rebase master # safe if you are alone working on that branch
git push --force # ditto. It pushes to origin, which is your fork.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment