From: Jinwook Jeong <vustthat@gmail.com>
To: "Carlo Marcelo Arenas Belón" <carenas@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: bugreport: "git checkout -B" allows checking out one branch across multiple worktrees
Date: Mon, 16 Jan 2023 11:50:10 +0900 [thread overview]
Message-ID: <CAA3Q-aazO1ko4uBSUs5W_rjn8AP_=fc2jAYrMsaeMtpnm54ExA@mail.gmail.com> (raw)
In-Reply-To: <20230116001144.dt76xk6hkwn45klz@Carlos-MacBook-Pro-2.local>
On Mon, Jan 16, 2023 at 9:11 AM Carlo Marcelo Arenas Belón
<carenas@gmail.com> wrote:
>
> On Sat, Jan 14, 2023 at 06:45:34PM +0900, Jinwook Jeong wrote:
> > What did you do before the bug happened? (Steps to reproduce your issue)
> >
> > 1. `cd` into any git repo that has at least one commit.
> > 2. Identify the current branch, say main
> > 3. $ git branch foo # a new branch
> > 4. $ git worktree add ../new_worktree foo
> > 5. $ cd ../new_worktree
> > 6. $ git checkout -B master HEAD
>
> Was your intention to get this worktree's content back to what is in
> master's HEAD?, then the command should had been
Sorry for confusion. These steps didn't reflect my real use case but
rather are for demonstration.
I encountered this issue by chance, not knowing how that command would
work under multiple worktrees.
prev parent reply other threads:[~2023-01-16 2:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-14 9:45 bugreport: "git checkout -B" allows checking out one branch across multiple worktrees Jinwook Jeong
2023-01-16 0:11 ` Carlo Marcelo Arenas Belón
2023-01-16 1:07 ` Eric Sunshine
2023-01-16 2:50 ` Jinwook Jeong [this message]
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAA3Q-aazO1ko4uBSUs5W_rjn8AP_=fc2jAYrMsaeMtpnm54ExA@mail.gmail.com' \
--to=vustthat@gmail.com \
--cc=carenas@gmail.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.
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).