Skip to content

Instantly share code, notes, and snippets.

@octacian

octacian/rebase.txt

Created May 30, 2017
Embed
What would you like to do?
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment