Skip to content

Instantly share code, notes, and snippets.

@urtens
Created February 7, 2017 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save urtens/36918861baa9a703aaa177f8ae50a571 to your computer and use it in GitHub Desktop.
Save urtens/36918861baa9a703aaa177f8ae50a571 to your computer and use it in GitHub Desktop.
git: squash last commits
# From http://stackoverflow.com/questions/5189560/squash-my-last-x-commits-together-using-git/5201642#5201642
git reset --soft HEAD~3 &&
git commit --edit -m"$(git log --format=%B --reverse HEAD..HEAD@{1})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment