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

Re: [DOC] more explanation about --git-dir and --work-tree options

From
しらいしななこ <nanako3@bluebottle.com>
Date
Apr 29, 2008, 21:30 UTC
Message-ID
<200804292130.m3TLUcxl026222@mi0.bluebottle.com>
In-Reply-To
<48162EF0.6050705@gmail.com>
Quoting Liu Yubao <yubao.liu@gmail.com>:
Show 11 quoted lines
> I find these two options bring me surprise:
>
>    git init $HOME
>    git add ~/.vimrc ~/.gvimrc ~/.vim
>    cd $HOME/work/xxx
>    ....do some work, then change ~/.vimrc without changing
>        working directory
>    git --git-dir $HOME/.git status
>
> I use --git-dir because I have another .git in $HOME/work/xxx, the
> last command surprises me much, it tells me .vim* are all deleted!
The behavior at the end user level was outlined earlier in the message http://marc.info/?l=git&m=120390208721287&w=2
A later message http://marc.info/?l=git&m=120445414611494&w=2 proposed an implementation change and described how the various pieces appear to programmers but it was lost when the code was scrapped.
I think it is a good idea to add a documentation like this to at least describe the behavior visible by the end users.
-- 
Nanako Shiraishi
http://ivory.ap.teacup.com/nanako3/

----------------------------------------------------------------------
Finally - A spam blocker that actually works.
http://www.bluebottle.com/tag/4
Previous: Michael J Gruber
Message 3 of 3 in “[DOC] more explanation about --git-dir and --work-tree options”
  1. Liu YubaoApr 28, 2008
  2. Michael J GruberApr 29, 2008
  3. しらいしななこApr 29, 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.