Git development
 help / color / mirror / Atom feed
* git-history(1) fixup broken with worktrees?
@ 2026-07-17 18:54 Toon Claes
  0 siblings, 0 replies; only message in thread
From: Toon Claes @ 2026-07-17 18:54 UTC (permalink / raw)
  To: Patrick Steinhardt, git

Hi,

Imagine this repoducer:

    $ git init
    $ echo Hello > README
    $ git add .
    $ git commit -m'initial commit'
    $ git worktree add ../feature
    $ echo world >> README
    $ git add .
    $ git history fixup HEAD
    $ cd ../feature

Now running git-status(1) in that other worktree gives me:

    $ git status

    On branch feature
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
            modified:   README

And:

    $ git diff --staged

    diff --git a/README b/README
    index 65a56c3..e965047 100644
    --- a/README
    +++ b/README
    @@ -1,2 +1 @@
     Hello
    -world


So suddenly my other worktree is dirty? With staged changes?
And I didn't even touch it.

Now the commit history is correct:

    $ git log --graph --oneline --all

    * 16ef548 (HEAD -> feature, main) initial commit



-- 
Cheers,
Toon

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-17 18:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 18:54 git-history(1) fixup broken with worktrees? Toon Claes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox