git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Add a git squash function?

From
TTThe Super Techie <thesupertechie1@gmail.com>
Date
Aug 16, 2026, 18:49 UTC
Message-ID
<bc49c03e-5a90-480e-8bfa-ad8fb8e42db2@gmail.com>
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
Next: Matej Dujava
Message 1 of 3 in “Add a git squash function?”
  1. The Super TechieAug 16, 2026
  2. Matej DujavaAug 16, 2026
  3. Bradley MorganAug 16, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.