A simple CLI tool to squash multiple Git commits into a single commit.
Download pre-compiled binary or
go install github.com/andrejsstepanovs/git-squash@latest# Interactive mode
git-squash
# Specify commit hash and message directly
git-squash -a <commit-hash> -m "New squashed commit message"Options:
-a, --hash– Optional commit hash to squash from-m, --message– Optional commit message for the squashed commit--max– Auto-select the oldest selectable commit
- Lists squashable commits (not pushed yet).
- Lets you select the starting commit interactively (or via
--hash). - Performs a
git reset --softand commits the changes with your message.
