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

Re: git rebase issue

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Mar 23, 2025, 01:37 UTC
Message-ID
<CAPig+cSswzF_Z9TsNEVi59ufdhwfZ+aN=NBmW+AmLwD2mFg8Pg@mail.gmail.com>
In-Reply-To
<CAHp75Vf8bB8o9feJHe4FpNo0TnfoRLG+C0roD4a1OaqN3NDj-A@mail.gmail.com>

On Sat, Mar 22, 2025 at 9:43 AM Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

Show 18 quoted lines
> On Mon, Mar 20, 2023 at 7:02 PM Jeff King <peff@peff.net> wrote:
> > On Mon, Mar 20, 2023 at 02:10:38PM +0200, Andy Shevchenko wrote:
> > > > > With the new release I have got an error
> > > > >   fatal: 'netboot' is already checked out at ...
> > > > > To work around this I have to split the above to
> > > > >   git checkout --ignore-other-worktrees "$branch"
> > > > >   git rebase --rebase-merges -X ours --onto "$newbase" "$oldbase"
> > > > > which makes all these too inconvenient.
> >
> > Running "git log --grep=already.checked.out" suggests that it may be
> > b5cabb4a967 (rebase: refuse to switch to branch already checked out
> > elsewhere, 2020-02-23).
>
> FWIW, the last couple of versions (since I was not updating Git from
> the sources too often, usually once per half a  year or so, I don't
> know the exact version which fixes it to me, and I don't want spend
> time to find that, because it works :) of Git seem to work properly to
> me. Thank you to everyone who made that happen!

This was very likely fixed by 78a95e0d80 (worktree: detect from secondary worktree if main worktree is bare, 2025-02-05); see [1].

Regarding the attempt you cited in [2] in which you removed config.worktree and disabled extensions.worktreeConfig, I suspect the reason you didn't see any change in behavior is because you didn't re-add "core.bare=true" to <repo>.git/config.

[1]: https://lore.kernel.org/git/pull.1829.v4.git.1738737014194.gitgitgadget@gmail.com/ [2]: https://lore.kernel.org/git/CAHp75VfSdth4B-oW8JCt4kBkehu6+B9ueQAJL1g99Ev3RiMKoQ@mail.gmail.com/

Previous: Andy Shevchenko
Message 10 of 10 in “git rebase issue”
  1. Andy ShevchenkoMar 13, 2023
  2. Andy ShevchenkoMar 13, 2023
  3. Andy ShevchenkoMar 20, 2023
  4. Felipe ContrerasMar 20, 2023
  5. Jeff KingMar 20, 2023
  6. Andy ShevchenkoMar 20, 2023
  7. Felipe ContrerasMar 23, 2023
  8. Andy ShevchenkoMar 24, 2023
  9. Andy ShevchenkoMar 22, 2025
  10. Eric SunshineMar 23, 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.