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

Re: git rebase stops on empty commits

From
MBMark Blakeney <markb@berlios.de>
Date
Jul 22, 2009, 12:29 UTC
Message-ID
<loom.20090722T120617-839@post.gmane.org>
In-Reply-To
<alpine.DEB.2.00.0907220907550.9220@ds9.cixit.se>
Peter Krefting <peter <at> softwolves.pp.se> writes:
> If you edit the commit, you claim ownership of it. You should probably try 
> using the -C option to commit, it should allow you to edit the message, 
> while keeping the authorship and timestamp intact.
Thanks Peter, that works well. E.g.
    % git rebase --continue
    Finished one cherry-pick.
    # Not currently on any branch.
    nothing to commit (working directory clean)
    Could not apply c33a375... Stop LNCC until OPC connection
    % git commit --allow-empty -C c33a375
    [detached HEAD e7d66f4] Stop LNCC until OPC connection
    % git rebase --continue
    ....

So rebase can actually do what I want but my fundamental issue remains. I said "pick" in the rebase for all of these commits but rebase is forcing me to do each one manually! And it requires some rather arcane git magic that could only be procured from a guru on a mailing list. :)

Surely something like an option --allow-empty on the rebase -i to skip over these no-brainer picks is trivial to implement - and makes sense? As a simple user, and knowing the original commits required --allow-empty, it was the first option I went looking for on the rebase -i when I encountered this problem.

Previous: Peter KreftingNext: Nanako Shiraishi
Message 4 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.