Skip to content

Instantly share code, notes, and snippets.

@thinktainer
Created August 30, 2013 14:25
Show Gist options
  • Save thinktainer/6390398 to your computer and use it in GitHub Desktop.
Save thinktainer/6390398 to your computer and use it in GitHub Desktop.
a workflow that allows me to squash my commits before merging to master / this depends on master not having moved since
combination of:
http://stackoverflow.com/questions/363908/how-do-i-use-git-rebase-i-to-rebase-all-changes-in-a-branch
http://stackoverflow.com/questions/5189560/how-can-i-squash-my-last-x-commits-together-using-git
git merge-base feature master
git reset --hard output of above sha
git merge --squash HEAD@{1}
git commit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment