Skip to content

Instantly share code, notes, and snippets.

@banagale
Created February 5, 2020 16:28
Show Gist options
  • Save banagale/0f5883aca2d9fc8ad3d9c6fc7e3ac799 to your computer and use it in GitHub Desktop.
Save banagale/0f5883aca2d9fc8ad3d9c6fc7e3ac799 to your computer and use it in GitHub Desktop.
# Squash X commits with an opportunity to update the message headline and body:
git reset --soft HEAD~X &&
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