{"thread":{"id":"12754","subject":"checkout detached work tree","startedAt":"2008-03-18T23:32:26Z","lastAt":"2008-03-20T15:01:55Z","messageCount":2,"participants":["Jörg Sommer","Nguyen Thai Ngoc Duy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"72386","messageId":"slrnfu0k9d.kfv.joerg@alea.gnuu.de","threadId":"12754","inReplyTo":null,"subject":"checkout detached work tree","fromName":"Jörg Sommer","fromEmail":"joerg@alea.gnuu.de","sentAt":"2008-03-18T23:32:26Z","receivedAt":"2008-03-18T23:32:26Z","isPatch":false,"sender":{"key":"joerg@alea.gnuu.de","avatar":null},"body":"Hi,\n\nis it correct that this checkout fails?\n\n% git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git symbolic-ref HEAD\nrefs/heads/master\n% git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git checkout\nfatal: /usr/bin/git-checkout cannot be used without a working tree.\n\nI want to do a checkout in a script without need to worry about the\ncurrent working directory. But it seams this is not possible. Many\ncommands fail. Is this behaviour expected?\n\nBye, Jörg.\n-- \nAls deutscher Tourist im Ausland steht man vor der Frage, ob man sich\nanständig benehmen muss oder ob schon deutsche Touristen dagewesen sind.\n\t  \t   \t     \t      \t        (Kurt Tucholsky)\n"},{"id":"72517","messageId":"fcaeb9bf0803200801y45255591t5c0e9505399cbb30@mail.gmail.com","threadId":"12754","inReplyTo":"slrnfu0k9d.kfv.joerg@alea.gnuu.de","subject":"Re: checkout detached work tree","fromName":"Nguyen Thai Ngoc Duy","fromEmail":"pclouds@gmail.com","sentAt":"2008-03-20T15:01:55Z","receivedAt":"2008-03-20T15:01:55Z","isPatch":false,"sender":{"key":"pclouds@gmail.com","avatar":"https://avatars.githubusercontent.com/u/720?v=4"},"body":"On Wed, Mar 19, 2008 at 6:32 AM, Jörg Sommer <joerg@alea.gnuu.de> wrote:\n> Hi,\n>\n>  is it correct that this checkout fails?\n>\n>  % git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git symbolic-ref HEAD\n>  refs/heads/master\n>  % git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git checkout\n>  fatal: /usr/bin/git-checkout cannot be used without a working tree.\n>\n>  I want to do a checkout in a script without need to worry about the\n>  current working directory. But it seams this is not possible. Many\n>  commands fail. Is this behaviour expected?\n\nWorks well here with version 1.5.4.2.281.g28d0e. What version were you using?\n-- \nDuy\n"}]}