git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grant Birchmeier <gbirchmeier@connamara.com>
To: git@vger.kernel.org
Subject: Re: bug report: I was allowed to "git checkout -b" while mid-rebase
Date: Wed, 18 Jun 2025 21:30:04 -0500	[thread overview]
Message-ID: <CAMq4opMBpg4315Q8awm5SQAQa1vms=3KB+SiQkGtCF7thBPjHw@mail.gmail.com> (raw)
In-Reply-To: <CABURp0orQ-UCzDgJc=STPQZaaEEGwR0GM-GZq_Ty3BXBKYS2iQ@mail.gmail.com>

(replying to both Jacob Keller and Phil Hord in here)

Jacob Keller wrote:
> 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.

  parent reply	other threads:[~2025-06-19  2:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19  0:12 bug report: I was allowed to "git checkout -b" while mid-rebase Grant Birchmeier
2025-06-19  0:19 ` Jacob Keller
     [not found] ` <CABURp0orQ-UCzDgJc=STPQZaaEEGwR0GM-GZq_Ty3BXBKYS2iQ@mail.gmail.com>
2025-06-19  2:30   ` Grant Birchmeier [this message]
2025-06-19  8:35     ` Re " K Jayatheerth
2025-06-19 17:31 ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMq4opMBpg4315Q8awm5SQAQa1vms=3KB+SiQkGtCF7thBPjHw@mail.gmail.com' \
    --to=gbirchmeier@connamara.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).