From: Aditya Garg Date: Mon, 09 Jun 2025 10:35:13 GMT Subject: Re: Question: is there a short way to merge the last commit to the second last one? Message-ID: In-Reply-To: > On 9 Jun 2025, at 3:34 PM, Phillip Wood wrote: > > On 08/06/2025 20:31, Phillip Wood wrote: >>> On 08/06/2025 19:57, brian m. carlson wrote: >>> >>> If your goal is to just do the fixups and squash and not anything else >>> interactive, then you can do this: >>> >>> GIT_SEQUENCE_EDITOR=true git rebase -i --autosquash >> Just a quick note to say that since git v2.44.0 you can just run >> git rebase --autosquash > > That will also rebase your branch if you don't specify a commit. When you're re-rolling a patch series it is normally preferred to keep the same base commit. You can do that by adding "--keep-base" to avoid rebasing onto the updated upstream branch. I'll try that. Thanks.