{"thread":{"id":"66182","subject":"Add a git squash function?","startedAt":"2026-08-16T18:49:54Z","lastAt":"2026-08-16T23:38:08Z","messageCount":3,"participants":["The Super Techie","Matej Dujava","Bradley Morgan"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"550674","messageId":"bc49c03e-5a90-480e-8bfa-ad8fb8e42db2@gmail.com","threadId":"66182","inReplyTo":null,"subject":"Add a git squash function?","fromName":"The Super Techie","fromEmail":"thesupertechie1@gmail.com","sentAt":"2026-08-16T18:49:50Z","receivedAt":"2026-08-16T18:49:54Z","isPatch":false,"body":"Hi,\n\nI am a developer who often squashes their commits using Git. Currently, \nthe simplest way to squash is to run the following two commands:\n\ngit reset --soft HEAD~3\n\ngit commit\n\nWhere 3 is the number of commits that a user would like to squash. \nHowever, what if there was a command like as follows:\n\ngit squash 3\n\nWhich did the same thing? This would save quite a bit of time for \ndevelopers. Since some projects require the DCO, an -s flag could be \nadded which would add a sign-off to the squashed commit as well.\n\nHas this been suggested before?\n\n~thesupertechie\n\n\n"},{"id":"550676","messageId":"aoIxALomheh-3N44@kocurkovo.cz","threadId":"66182","inReplyTo":"bc49c03e-5a90-480e-8bfa-ad8fb8e42db2@gmail.com","subject":"Re: Add a git squash function?","fromName":"Matej Dujava","fromEmail":"mdujava@kocurkovo.cz","sentAt":"2026-08-16T21:52:00Z","receivedAt":"2026-08-16T21:58:09Z","isPatch":false,"body":"On Sun, Aug 16, 2026 at 11:49:50AM -0700, The Super Techie wrote:\n>Hi,\n\nHi,\n\n>\n>I am a developer who often squashes their commits using Git. \n>Currently, the simplest way to squash is to run the following two \n>commands:\n>\n>git reset --soft HEAD~3\n>\n>git commit\n>\n>Where 3 is the number of commits that a user would like to squash. \n>However, what if there was a command like as follows:\n>\n>Which did the same thing? This would save quite a bit of time for \n>developers. Since some projects require the DCO, an -s flag could be \n>added which would add a sign-off to the squashed commit as well.\n\nwhen later commits are adressing feedback you can do fixup! or squash!\ncommits and then cleanup before merge: `git rebase --autosquash HEAD~3`\n\n>\n>Has this been suggested before?\n\nLooks like there is a v13 [0] patchset discussing similar worflow, which\nstarted as [1].\n\n>\n>git squash 3\n\nsuggested command was `git history squash HEAD~3` but this will keep\nmessage of the fist commit\n\n\n[0] https://lore.kernel.org/git/pull.2337.v13.git.git.1786088371.gitgitgadget@gmail.com/\n[1] https://lore.kernel.org/git/pull.2337.git.git.1781465141.gitgitgadget@gmail.com/\n\nThanks,\nMatej\n"},{"id":"550677","messageId":"86884685-B682-445B-B57B-113A0D00DF41@grrlz.net","threadId":"66182","inReplyTo":"aoIxALomheh-3N44@kocurkovo.cz","subject":"Re: Add a git squash function?","fromName":"Bradley Morgan","fromEmail":"include@grrlz.net","sentAt":"2026-08-16T23:38:05Z","receivedAt":"2026-08-16T23:38:08Z","isPatch":false,"body":"Hi,\n\nYes, absolutely yes a squash function would be useful, anyone developing\nit, please do.\n\nI get annoyed with rebase headaches.\n\nThanks!\n"}]}