git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git rebase allows branches to be checked out in multiple worktrees
@ 2020-02-20  0:29 Mike Hommey
  2020-02-23 10:14 ` [PATCH 0/2] git-rebase: refuse to switch to branch checked out elsewhere Eric Sunshine
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Hommey @ 2020-02-20  0:29 UTC (permalink / raw)
  To: git

Hi,

I just noticed a quirk with git rebase vs. worktrees. While using e.g.
git checkout will prevent a same branch from being checked out from
multiple worktrees, that's not the case for git-rebase, so the following
scenario ends up with two checkouts of the same branch:

$ git checkout -b foo HEAD~
$ git commit --allow-empty -m foo 
$ git worktree add /tmp/bar master
$ cd /tmp/bar
$ git rebase master foo

Mike

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

end of thread, other threads:[~2020-02-24  9:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-20  0:29 git rebase allows branches to be checked out in multiple worktrees Mike Hommey
2020-02-23 10:14 ` [PATCH 0/2] git-rebase: refuse to switch to branch checked out elsewhere Eric Sunshine
2020-02-23 10:14   ` [PATCH 1/2] t3400: make test clean up after itself Eric Sunshine
2020-02-24  9:19     ` Eric Sunshine
2020-02-23 10:14   ` [PATCH 2/2] rebase: refuse to switch to branch already checked out elsewhere Eric Sunshine

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).