git squash
Squash multiple commits into a single commit. Part of
git-extras. More information: https://manned.org/git-squash.
- Merge all commits from a specific branch into the current branch as a single commit:
git squash
- Squash all commits starting with a specific commit on the current branch:
git squash
- Squash the
nlatest commits and commit with a message:
git squash HEAD~ ""
- Squash the
nlatest commits and commit concatenating all individual messages:
git squash --squash-msg HEAD~
来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
