Re: $GIT_DIR usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dmitry Kakurin wrote:
I think you also need to set GIT_WORK_TREE.
This way Git will know the root of directories that it controls.

- Dmitry
----- Original Message ----- From: "Dan Zwell" <dzwell@xxxxxxxxx>
Newsgroups: gmane.comp.version-control.git
To: <git@xxxxxxxxxxxxxxx>
Sent: Sunday, 5 August 2007 2:58
Subject: $GIT_DIR usage


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


Thank you. I also had to upgrade Git to the as-yet unreleased version (this variable doesn't exist in the current stable release), but what you said makes sense and seems like it should work.

Dan
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux