Re: Question: is there a short way to merge the last commit to the second last one?
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Jun 9, 2025, 10:06 UTC
- Message-ID
- <bf6b2d49-d2c6-4197-99ae-06401093c8b8@gmail.com>
- In-Reply-To
- <993914f7-5023-459c-b1e8-ebec2646e243@gmail.com>
On 08/06/2025 20:31, Phillip Wood wrote:
Show 10 quoted lines
> 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