{"thread":{"id":"22501","subject":"Odd error when doing \"clone && cd && checkout -b\"","startedAt":"2010-02-03T07:00:16Z","lastAt":"2010-02-03T13:25:58Z","messageCount":3,"participants":["Jacob Helwig","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"133445","messageId":"20100203070016.GA18089@vfb-9.home","threadId":"22501","inReplyTo":null,"subject":"Odd error when doing \"clone && cd && checkout -b\"","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2010-02-03T07:00:16Z","receivedAt":"2010-02-03T07:00:16Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"In talking with someone in the IRC channel, I ran across something that\nI thought was very odd behavior.  I'm sure there's a very simple\nexplanation, but I can't think of what it might be.\n\nThe person was getting \"fatal: git checkout: updating paths is\nincompatible with switching branches.\", when they tried to create a new\ntracking branch, and switch to it, with a fresh clone.  I was able to\nreproduce this, but only by one-lining the \"clone && cd && checkout -b\".\n\nWhen the \"checkout -b\" fails from the one-lined version, immediately\ndoing the \"checkout -b\" on its own succeeds.\n\nThe output below is from zsh (4.3.10), however I get the exact same\nbehavior when I run the commands using bash (4.0.33).  I was testing\nthis using Git 1.6.6.1.598.g661e2.\n\n== One-lined Version ==\n\nvfb-9 ~/tmp % git clone git://github.com/rich97/CakeCMP.git && cd CakeCMP && git checkout -b permissions-rewrite origin/permissions-rewrite\nInitialized empty shared Git repository in /home/jhe/tmp/CakeCMP/.git/   \nremote: Counting objects: 1508, done.\nremote: Compressing objects: 100% (1432/1432), done.\nremote: Total 1508 (delta 256), reused 1235 (delta 60)\nReceiving objects: 100% (1508/1508), 844.43 KiB | 104 KiB/s, done.\nResolving deltas: 100% (256/256), done.\nfatal: git checkout: updating paths is incompatible with switching branches.\nDid you intend to checkout 'origin/permissions-rewrite' which can not be resolved as commit?\n\nvfb-9 ~/tmp/CakeCMP on master(a026490) sigexit % git checkout -b permissions-rewrite origin/permission-rewrite\nBranch permissions-rewrite set up to track remote branch permission-rewrite from origin.\nSwitched to a new branch 'permissions-rewrite'\n\n== Running \"checkout -b\" on its own ==\n\nvfb-9 ~/tmp % git clone git://github.com/rich97/CakeCMP.git && cd CakeCMP\nInitialized empty shared Git repository in /home/jhe/tmp/CakeCMP/.git/\nremote: Counting objects: 1508, done.\nremote: Compressing objects: 100% (1432/1432), done.\nremote: Total 1508 (delta 256), reused 1235 (delta 60)\nReceiving objects: 100% (1508/1508), 844.43 KiB | 93 KiB/s, done.\nResolving deltas: 100% (256/256), done.\n\nvfb-9 ~/tmp/CakeCMP on master(a026490) % git checkout -b permissions-rewrite origin/permission-rewrite\nBranch permissions-rewrite set up to track remote branch permission-rewrite from origin.\nSwitched to a new branch 'permissions-rewrite'\n\nvfb-9 ~/tmp/CakeCMP on permissions-rewrite(ca687f1) % git --version\ngit version 1.6.6.1.598.g661e2\n\n-Jacob\n"},{"id":"133448","messageId":"4B692863.9000409@viscovery.net","threadId":"22501","inReplyTo":"20100203070016.GA18089@vfb-9.home","subject":"Re: Odd error when doing \"clone && cd && checkout -b\"","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-02-03T07:40:19Z","receivedAt":"2010-02-03T07:40:19Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Jacob Helwig schrieb:\n> vfb-9 ~/tmp % git clone git://github.com/rich97/CakeCMP.git && cd CakeCMP && git checkout -b permissions-rewrite origin/permissions-rewrite\n> Initialized empty shared Git repository in /home/jhe/tmp/CakeCMP/.git/   \n> remote: Counting objects: 1508, done.\n> remote: Compressing objects: 100% (1432/1432), done.\n> remote: Total 1508 (delta 256), reused 1235 (delta 60)\n> Receiving objects: 100% (1508/1508), 844.43 KiB | 104 KiB/s, done.\n> Resolving deltas: 100% (256/256), done.\n> fatal: git checkout: updating paths is incompatible with switching branches.\n> Did you intend to checkout 'origin/permissions-rewrite' which can not be resolved as commit?\n\nOr did you intend to track 'origin/permission-rewrite' instead ;-)\n\n-- Hannes\n\nPS: Please don't set Mail-Followup-To for this list.\n"},{"id":"133469","messageId":"20100203132558.GA4595@vfb-9.home","threadId":"22501","inReplyTo":"4B692863.9000409@viscovery.net","subject":"Re: Odd error when doing \"clone && cd && checkout -b\"","fromName":"Jacob Helwig","fromEmail":"jacob.helwig@gmail.com","sentAt":"2010-02-03T13:25:58Z","receivedAt":"2010-02-03T13:25:58Z","isPatch":false,"sender":{"key":"jacob.helwig@gmail.com","avatar":"https://avatars.githubusercontent.com/u/14557?v=4"},"body":"On Tue, Feb 2, 2010 at 23:40, Johannes Sixt <j.sixt@viscovery.net> wrote:\n> Jacob Helwig schrieb:\n>> vfb-9 ~/tmp % git clone git://github.com/rich97/CakeCMP.git && cd CakeCMP && git checkout -b permissions-rewrite origin/permissions-rewrite\n>> Initialized empty shared Git repository in /home/jhe/tmp/CakeCMP/.git/\n>> remote: Counting objects: 1508, done.\n>> remote: Compressing objects: 100% (1432/1432), done.\n>> remote: Total 1508 (delta 256), reused 1235 (delta 60)\n>> Receiving objects: 100% (1508/1508), 844.43 KiB | 104 KiB/s, done.\n>> Resolving deltas: 100% (256/256), done.\n>> fatal: git checkout: updating paths is incompatible with switching branches.\n>> Did you intend to checkout 'origin/permissions-rewrite' which can not be resolved as commit?\n>\n> Or did you intend to track 'origin/permission-rewrite' instead ;-)\n>\n> -- Hannes\n>\n> PS: Please don't set Mail-Followup-To for this list.\n>\n\nWell, I _thought_ I had used the exact same command for the \"checkout\n-b\".  Obviously, this is not the case.  Bah.  That's what I get for\ntrying to do anything so late.\n\nApparently Mutt defaults to setting the Mail-Followup-To, if you've let\nit know about a list.  Anyway...that's been fixed.\n\n-Jacob\n"}]}