Skip to content

Instantly share code, notes, and snippets.

@rbinksy
rbinksy / squash-and-merge-cli.md
Created July 15, 2021 09:19 — forked from aortbals/squash-and-merge-cli.md
Squash and Merge on the Command line

With the introduction of GitHub's Squash and Merge feature, this has become less prevelant, however it's still useful in scenarios where GitHub's interface is unavailable.

Let's talk through two ways to do a squash and merge on the command line.

Take 1: Interactive Rebase

When to use it

  • When you have not merged master into your feature branch
  • There are no merge conflicts