git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* "git branch -f" corrupt other worktree
@ 2019-05-02 11:58 frank kulow
  2019-05-02 12:29 ` Duy Nguyen
  0 siblings, 1 reply; 6+ messages in thread
From: frank kulow @ 2019-05-02 11:58 UTC (permalink / raw)
  To: git

git version 2.21.0.windows.1

> /c/tmp/gt (Branch_702091a0)
$ git worktree add ../wt master
Preparing worktree (checking out 'master')
HEAD is now at f534c32 4

> /c/tmp/gt (Branch_702091a0)
$ git branch -D master
error: Cannot delete branch 'master' checked out at 'C:/tmp/wt'

#but this is possible:

> /c/tmp/gt (Branch_702091a0)
$ git branch -f master HEAD

#and the other worktree is now corrupted:

> /c/tmp/wt (master)
$ git status
On branch master
Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   txt.txt
        deleted:    txtb.txt



greetings f.kulow

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-05-02 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-02 11:58 "git branch -f" corrupt other worktree frank kulow
2019-05-02 12:29 ` Duy Nguyen
2019-05-02 12:51   ` Ævar Arnfjörð Bjarmason
2019-05-02 13:05     ` Duy Nguyen
2019-05-02 13:49       ` Duy Nguyen
2019-05-02 17:16       ` Duy Nguyen

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).