Skip to content

Instantly share code, notes, and snippets.

@octacian
Created May 30, 2017 03:19
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 octacian/99d3996dc8835167b5d9460658a36f3e to your computer and use it in GitHub Desktop.
Save octacian/99d3996dc8835167b5d9460658a36f3e to your computer and use it in GitHub Desktop.
Basics of git rebase
-- Fetch origin (NOT pull)
git fetch origin
-- Make sure your on the master branch (not required if you already know you are)
git checkout master
-- Rebase
git rebase origin/master
-- If you are alerted to any conflicts, resolve them and run the following 2 commands (no git commit needed)
-- Note: If you try to do anything else (or open GitKraken) before rebase is done, it will just give you an
-- error ranging from invalid repository to other stuff. If you want to abort a rebase, use git rebase --abort
git add .
git rebase --continue
-- Finally, if conflicts arose - force push, otherwise push normally
git push origin +master
-- or
git push origin master
@jasongoossens
Copy link

*you're

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment