{"thread":{"id":"58221","subject":"How to specify a remote branch in git worktree?","startedAt":"2022-07-25T20:51:45Z","lastAt":"2022-07-25T21:08:17Z","messageCount":2,"participants":["Elie Obeid"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"459923","messageId":"CAFWJc9_QM1CQ69yXCOHTi4KSZJffhty5s=egUUx-6RTjUVF9+w@mail.gmail.com","threadId":"58221","inReplyTo":null,"subject":"How to specify a remote branch in git worktree?","fromName":"Elie Obeid","fromEmail":"elieobeid7@gmail.com","sentAt":"2022-07-25T20:51:09Z","receivedAt":"2022-07-25T20:51:45Z","isPatch":false,"sender":{"key":"elieobeid7@gmail.com","avatar":null},"body":"Hi, I have two remote branches prod and beta, I want to create one\nworktree for prod and one for beta.\n\n\nmkdir app && cd app\ngit clone --bare repo .git\ngit worktree add --checkout beta beta\ngit worktree add --checkout prod prod\ncd prod\ngit pull\nMege conflict\n\n\n\nAs you can see, I get a merge conflict  right after I clone the repo,\ncreate  the worktree and do a git pull, maybe the worktree is trying\nto do a pull from master, I have no idea\nHow to fix that?\n\n\nBest Regards.\n"},{"id":"459926","messageId":"CAFWJc98dciS9wZ359PJjMeNhiG_+xy2otkz4a79MoPCRK-Mxew@mail.gmail.com","threadId":"58221","inReplyTo":"CAFWJc9_QM1CQ69yXCOHTi4KSZJffhty5s=egUUx-6RTjUVF9+w@mail.gmail.com","subject":"Re: How to specify a remote branch in git worktree?","fromName":"Elie Obeid","fromEmail":"elieobeid7@gmail.com","sentAt":"2022-07-25T21:07:40Z","receivedAt":"2022-07-25T21:08:17Z","isPatch":false,"sender":{"key":"elieobeid7@gmail.com","avatar":null},"body":"The regular clone (without using --bare), works excellently, with no\nissues, I just tested it,\nadded workspaces and all is fine.\n\nBest Regards.\n\n\nOn Tue, Jul 26, 2022 at 12:51 AM Elie Obeid <elieobeid7@gmail.com> wrote:\n>\n> Hi, I have two remote branches prod and beta, I want to create one\n> worktree for prod and one for beta.\n>\n>\n> mkdir app && cd app\n> git clone --bare repo .git\n> git worktree add --checkout beta beta\n> git worktree add --checkout prod prod\n> cd prod\n> git pull\n> Mege conflict\n>\n>\n>\n> As you can see, I get a merge conflict  right after I clone the repo,\n> create  the worktree and do a git pull, maybe the worktree is trying\n> to do a pull from master, I have no idea\n> How to fix that?\n>\n>\n> Best Regards.\n"}]}