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

Re: bug report: I was allowed to "git checkout -b" while mid-rebase

From
GBGrant Birchmeier <gbirchmeier@connamara.com>
Date
Jun 19, 2025, 02:30 UTC
Message-ID
<CAMq4opMBpg4315Q8awm5SQAQa1vms=3KB+SiQkGtCF7thBPjHw@mail.gmail.com>
In-Reply-To
<CABURp0orQ-UCzDgJc=STPQZaaEEGwR0GM-GZq_Ty3BXBKYS2iQ@mail.gmail.com>
(replying to both Jacob Keller and Phil Hord in here)
Jacob Keller wrote:
Show 5 quoted lines
> One thing you could try is "git rebase --abort" to see if it can abort
> the rebase and undo things. If that resets the index properly, then use
> git reflog to make sure the ilogger branch is restored to the pre-rebase
> state, or possibly use it on HEAD to find any intermediate commits/edits
> you may have made while rebasing.

Yeah... except I am partway through the rebase. I was through like 6 of 8 files that needed manual intervention. Was hoping I wouldn't lose that.

Though now that I think about it, I suppose I can copy the already-rebased files into a temp dir, then abort, then copy them back. That would be an effective workaround.

Phil Hord wrote:
> You did pick up an extra branch "net5" which will follow your rebase.  But you should find when the rebase completes that both "net5" and "ilogger" point to the tip of your rebased branch.
Oh, really, that's interesting.  I'll see what happens.  (Tomorrow.)

Thank for explaining the technical reason why "git checkout" w/wo "-b" behaves differently in this regard. But this can't be an intentional design choice, or a behavior that even a moderately-experienced user would expect.

-Grant
-- 
Grant Birchmeier
Director of Engineering, Connamara
gbirchmeier@connamara.com

-- 
This email, along with any attachments, is confidential. If you believe you 
received this message in error, please contact the sender immediately and 
delete all copies of the message. Thank you from Connamara Systems, LLC.
Previous: Junio C HamanoNext: K Jayatheerth
Message 4 of 5 in “bug report: I was allowed to "git checkout -b" while mid-rebase”
  1. Grant BirchmeierJun 19, 2025
  2. Jacob KellerJun 19, 2025
  3. Junio C HamanoJun 19, 2025
  4. Grant BirchmeierJun 19, 2025
  5. Re bug report: I was allowed to "git checkout -b" while mid-rebaseK Jayatheerth, Jun 19, 2025

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.