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

git rebase stops on empty commits

From
MBMark Blakeney <markb@berlios.de>
Date
Jul 22, 2009, 07:22 UTC
Message-ID
<33e2b2760907220022rbad30d7x255bcb63c5b8cc2f@mail.gmail.com>

I am new to git but think I have found a bug. I searched the git archives and found the same issue reported by Michael Gruber about 1 year ago but it was discounted by Stephan Beyer and the problem seems to be forgotten about.

See http://kerneltrap.org/mailarchive/git/2008/7/8/2388804

In short, I think git rebase needs a "--allow-empty" option. I have git repo which I converted from an old system and which for various reasons requires me to --allow-empty commits when I build it. The repo has about 3300 commits but now when I try to fix up some of the early commit comments using git rebase -i I find I have to manually sit at the terminal and dumbly type;

    git commit --allow-empty (then quit out of editor)
    git rebase --continue
ad nauseum for all the many empty commits ...

I'm only rebasing to change some commit messages which must be a trivial git operation. Surely git rebase -i should be able to be told to continue through empty commits itself? At the very least some kind of message to the user would help - I only found that git commit --allow-empty works around this rebase problem once I found the old post above.

I am using the latest version 1.6.3.3 of git. This is the version used to build the repo from scratch and for the git rebase -i etc.

-- Mark Blakeney

Next: Mark Blakeney
Message 1 of 6 in “git rebase stops on empty commits”
  1. Mark BlakeneyJul 22, 2009
  2. Mark BlakeneyJul 22, 2009
  3. Peter KreftingJul 22, 2009
  4. Mark BlakeneyJul 22, 2009
  5. Nanako ShiraishiJul 22, 2009
  6. Mark BlakeneyJul 22, 2009

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.