{"thread":{"id":"45239","subject":"Bug: \"git worktree add\" Unable to checkout a branch with no local ref","startedAt":"2017-02-27T14:54:01Z","lastAt":"2017-02-28T09:16:57Z","messageCount":2,"participants":["Alexander Grigoriev","Duy Nguyen"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"312724","messageId":"0E511C089BC341FBA9DC694C1CE770AE@daddy","threadId":"45239","inReplyTo":null,"subject":"Bug: \"git worktree add\" Unable to checkout a branch with no local ref","fromName":"Alexander Grigoriev","fromEmail":"alegrigoriev@gmail.com","sentAt":"2017-02-27T14:22:35Z","receivedAt":"2017-02-27T14:54:01Z","isPatch":false,"sender":{"key":"alegrigoriev@gmail.com","avatar":null},"body":"git version 2.10.2.windows.1:\nIf a remote branch has never been checked out locally (its ref only exists \nin remotes/<remote>/ directory), \"git worktree add\" command is unable to \ncheck it out by its normal short name (not prefixed by remotes/<remote>), \nwhile \"git checkout\" command has been able to handle such a branch and \nproperly convert it to a local branch. \n\n"},{"id":"312826","messageId":"CACsJy8DQTi5s2BmHSkTTjVKZu+ToeVhywkZa2hzGtkzWo95LJw@mail.gmail.com","threadId":"45239","inReplyTo":"0E511C089BC341FBA9DC694C1CE770AE@daddy","subject":"Re: Bug: \"git worktree add\" Unable to checkout a branch with no local ref","fromName":"Duy Nguyen","fromEmail":"pclouds@gmail.com","sentAt":"2017-02-28T09:15:01Z","receivedAt":"2017-02-28T09:16:57Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Mon, Feb 27, 2017 at 9:22 PM, Alexander Grigoriev\n<alegrigoriev@gmail.com> wrote:\n> git version 2.10.2.windows.1:\n> If a remote branch has never been checked out locally (its ref only exists\n> in remotes/<remote>/ directory), \"git worktree add\" command is unable to\n> check it out by its normal short name (not prefixed by remotes/<remote>),\n> while \"git checkout\" command has been able to handle such a branch and\n> properly convert it to a local branch.\n\nWe call that \"dwim\" (do what I mean). Unfortunately \"git worktree add\"\ndoes not support it.\n\nIn the early prototype, \"git worktree\" called \"git checkout\"\nunderneath and something like that should have worked. But I don't\nremember if the dwim came up when we decided not to let \"git worktree\"\nrun \"git checkout\". And since dwim thing is checkout thing, the\nfeature is gone from \"git worktree add\".\n\nAnyway, I think patches are welcome.\n-- \nDuy\n"}]}