From: Phillip Wood Date: Mon, 09 Jun 2025 10:06:03 GMT Subject: Re: Question: is there a short way to merge the last commit to the second last one? Message-ID: In-Reply-To: <993914f7-5023-459c-b1e8-ebec2646e243@gmail.com> 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. Best Wishes Phillip