Skip to content

Instantly share code, notes, and snippets.

@raghavauppuluri13
Last active February 25, 2023 22:53
Show Gist options
  • Save raghavauppuluri13/cc84469719528136fd17d93dc1a2c745 to your computer and use it in GitHub Desktop.
Save raghavauppuluri13/cc84469719528136fd17d93dc1a2c745 to your computer and use it in GitHub Desktop.
How to write good commits
Squashing
# Squashes the previous 2 commits and staged changes
git reset --soft HEAD~1 && 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