Skip to content

Instantly share code, notes, and snippets.

@wilhelmberg
Last active August 29, 2015 14:23
Show Gist options
  • Save wilhelmberg/ced6c61266556881cac3 to your computer and use it in GitHub Desktop.
Save wilhelmberg/ced6c61266556881cac3 to your computer and use it in GitHub Desktop.
git squash commits already pushed to orgin
#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