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

Re: [BUG] rebase -i with only empty commits

From
Philip Oakley <philipoakley@iee.org>
Date
Aug 23, 2017, 22:42 UTC
Message-ID
<D0634C4264E4400492C9424041D7AF02@PhilipOakley>
In-Reply-To
<alpine.DEB.2.21.1.1708231639470.19382@virtualbox>
From: "Johannes Schindelin" <Johannes.Schindelin@gmx.de>
<snip>
Show 19 quoted lines
>> So the problem seems to be that rebase -i (like rebase without -i)
>> considers "empty commits" as commits to be ignored. However, when using
>> rebase -i one expects that you can include the empty commit...
>>
>> Also, the behavior is odd. When I only have empty commits, a "git rebase
>> master" works as expected like a "git reset --hard master" but "git
>> rebase -i" does nothing.
>>
>> The expected behavior would be that the editor shows up with a
>> git-rebase-todo like:
>> # pick 3d0f6c49 empty commit
>> # pick bbbc5941 another empty commit
>> noop
>
> These days, I reflexively type `rebase -ki` instead of `rebase -i`. Maybe
> you want to do that, too?
>
> Ciao,
> Dscho

Is the -k option actually documented? I couldn't see it in the man pages. I'm guessing it's the same as `--keep-empty`. -- Philip

Previous: Junio C HamanoNext: Phillip Wood
Message 8 of 9 in “[BUG] rebase -i with empty commits + exec”
  1. Stefan BellerAug 22, 2017
  2. [BUG] rebase -i with only empty commitsStephan Beyer, Aug 23, 2017
  3. Johannes SchindelinAug 23, 2017
  4. Stephan BeyerAug 23, 2017
  5. Stefan BellerAug 23, 2017
  6. Stephan BeyerAug 23, 2017
  7. Junio C HamanoAug 23, 2017
  8. Philip OakleyAug 23, 2017
  9. Phillip WoodAug 24, 2017

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.