Thread (3 messages) flat view 3 messages, 3 authors, 4d ago

Add a git squash function?

From: The Super Techie <hidden>
Date: 2026-08-16 18:49:54

Hi,

I am a developer who often squashes their commits using Git. Currently, 
the simplest way to squash is to run the following two commands:

git reset --soft HEAD~3

git commit

Where 3 is the number of commits that a user would like to squash. 
However, what if there was a command like as follows:

git squash 3

Which did the same thing? This would save quite a bit of time for 
developers. Since some projects require the DCO, an -s flag could be 
added which would add a sign-off to the squashed commit as well.

Has this been suggested before?

~thesupertechie

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help