Created
May 30, 2017 03:19
-
-
Save octacian/99d3996dc8835167b5d9460658a36f3e to your computer and use it in GitHub Desktop.
Basics of git rebase
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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
*you're