$GIT_DIR usage

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Dan Zwell
Date: Sunday, August 5, 2007 - 2:58 am

Hi, I had a question about $GIT_DIR. That is to say, it doesn't seem to 
work. I am using Git 1.5.2.4. See the following: (all the commands I 
tried besides "git-init" failed).

$ export GIT_DIR="`pwd`/.git_public"
$ git init
warning: templates not found /usr/share//git-core/templates/
Initialized empty Git repository in /home/user/temp/.git_public/
$ echo > new_file
$ git add new_file
fatal: add must be run in a work tree
$ git commit -a
fatal: /usr/bin/git-commit cannot be used without a working tree.
$ git commit
fatal: /usr/bin/git-commit cannot be used without a working tree.
$

Is $GIT_DIR not meant to be used this way? Does it have a different 
purpose / use case, or is this just a bug?

Thanks,
Dan
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
$GIT_DIR usage, Dan Zwell, (Sun Aug 5, 2:58 am)
Re: $GIT_DIR usage, Dmitry Kakurin, (Sun Aug 5, 4:55 am)
Re: $GIT_DIR usage, Dan Zwell, (Sun Aug 5, 5:22 am)
Re: $GIT_DIR usage, Johannes Schindelin, (Sun Aug 5, 5:33 am)
Re: $GIT_DIR usage, Dan Zwell, (Sun Aug 5, 6:02 am)
Re: $GIT_DIR usage, Johannes Schindelin, (Sun Aug 5, 6:41 am)