git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: checkout detached work tree

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Mar 20, 2008, 15:01 UTC
Message-ID
<fcaeb9bf0803200801y45255591t5c0e9505399cbb30@mail.gmail.com>
In-Reply-To
<slrnfu0k9d.kfv.joerg@alea.gnuu.de>
On Wed, Mar 19, 2008 at 6:32 AM, Jörg Sommer <joerg@alea.gnuu.de> wrote:
Show 12 quoted lines
> Hi,
>
>  is it correct that this checkout fails?
>
>  % git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git symbolic-ref HEAD
>  refs/heads/master
>  % git --git-dir=$HOME/git/git/.git --work-tree=/tmp/git checkout
>  fatal: /usr/bin/git-checkout cannot be used without a working tree.
>
>  I want to do a checkout in a script without need to worry about the
>  current working directory. But it seams this is not possible. Many
>  commands fail. Is this behaviour expected?
Works well here with version 1.5.4.2.281.g28d0e. What version were you using?
-- 
Duy
Previous: Jörg Sommer
Message 2 of 2 in “checkout detached work tree”
  1. Jörg SommerMar 18, 2008
  2. Nguyen Thai Ngoc DuyMar 20, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.