Skip to content

Instantly share code, notes, and snippets.

@rickbassham
Created December 29, 2020 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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