Last active
August 29, 2015 14:23
-
-
Save wilhelmberg/ced6c61266556881cac3 to your computer and use it in GitHub Desktop.
git squash commits already pushed to orgin
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
#optional, as I messed things up, by not using "--force" or "+<BRANCH>" | |
git checkout develop | |
git pull | |
git checkout develop-vs2015 | |
git pull | |
#rebase on "develop" | |
git rebase develop | |
git push origin +develop-vs2015 | |
#do the squash: 7 commits | |
# vim: | |
# ESC -> commands mode | |
# i -> insert mode | |
# :wq -> save and exit | |
# S -> delete line at cursor | |
git rebase -i origin/develop-vs2015~7 develop-vs2015 | |
git push origin +develop-vs2015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment