git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to specify a remote branch in git worktree?
@ 2022-07-25 20:51 Elie Obeid
  2022-07-25 21:07 ` Elie Obeid
  0 siblings, 1 reply; 2+ messages in thread
From: Elie Obeid @ 2022-07-25 20:51 UTC (permalink / raw)
  To: git

Hi, I have two remote branches prod and beta, I want to create one
worktree for prod and one for beta.


mkdir app && cd app
git clone --bare repo .git
git worktree add --checkout beta beta
git worktree add --checkout prod prod
cd prod
git pull
Mege conflict



As you can see, I get a merge conflict  right after I clone the repo,
create  the worktree and do a git pull, maybe the worktree is trying
to do a pull from master, I have no idea
How to fix that?


Best Regards.

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

* Re: How to specify a remote branch in git worktree?
  2022-07-25 20:51 How to specify a remote branch in git worktree? Elie Obeid
@ 2022-07-25 21:07 ` Elie Obeid
  0 siblings, 0 replies; 2+ messages in thread
From: Elie Obeid @ 2022-07-25 21:07 UTC (permalink / raw)
  To: git

The regular clone (without using --bare), works excellently, with no
issues, I just tested it,
added workspaces and all is fine.

Best Regards.


On Tue, Jul 26, 2022 at 12:51 AM Elie Obeid <elieobeid7@gmail.com> wrote:
>
> Hi, I have two remote branches prod and beta, I want to create one
> worktree for prod and one for beta.
>
>
> mkdir app && cd app
> git clone --bare repo .git
> git worktree add --checkout beta beta
> git worktree add --checkout prod prod
> cd prod
> git pull
> Mege conflict
>
>
>
> As you can see, I get a merge conflict  right after I clone the repo,
> create  the worktree and do a git pull, maybe the worktree is trying
> to do a pull from master, I have no idea
> How to fix that?
>
>
> Best Regards.

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

end of thread, other threads:[~2022-07-25 21:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-25 20:51 How to specify a remote branch in git worktree? Elie Obeid
2022-07-25 21:07 ` Elie Obeid

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