Squash all commits starting with a specific commit on the current branch

git squash

  • Squash multiple commits into a single commit.
    Part of `git-extras`.
    More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-squash>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git squash {{commit}}

click the source code to copy install git squash on any operating system with command-not-found.com