LinuxCommandLibrary

git-squash

Squash a branch into a single commit

TLDR

Squash branch into current

$ git squash [branch]
copy
Squash with message
$ git squash [branch] "[message]"
copy

SYNOPSIS

git squash branch [message]

DESCRIPTION

git squash merges all commits from a specified branch into the current branch as a single squashed commit. Part of git-extras, it is useful for cleaning up feature branch history before merging into the main branch.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community