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

GIT_DIR used to work with git-1.4.4.4

From
Christian MICHON <christian.michon@gmail.com>
Date
May 18, 2007, 14:24 UTC
Message-ID
<46d6db660705180724n43dfeebakf5725a04e5b10673@mail.gmail.com>

sorry if I created too much (user) noise around this issue, but this is mostly why as a user I refrained using git-1.5.x

I sometimes have a scm work flow where I'd like to have my GIT_DIR sitting on another file system, so therefore not in the current working directory.

I used to be able to do this in git-1.4.4.4: (it's a rather useless example, I know)

mkdir /home/xian/vault export GIT_DIR=/home/xian/vault mkdir /tmp/xianwork cd /tmp/xianwork touch a b git init-db git add .

This was truly working, and now using git-1.5.1.4, it's not.
Instead I get: "fatal: add must be run in a work tree"

from the source code, I understand what to change if I want to get the old behavior.

My questions are:
- is this new behavior truly needed ?
- is there another way to do this using newer work flow ?
( I know already about the symbolic .git link trick )
Thanks in advance for any useful tips.
-- 
Christian
Message 1 of 1 in “GIT_DIR used to work with git-1.4.4.4”
  1. Christian MICHONMay 18, 2007

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.