Re: Possible bug in 1.6.6 with reset --hard and $GIT_WORK_TREE
- From
Tay Ray Chuan <rctay89@gmail.com>
- Date
- Dec 29, 2009, 08:12 UTC
- Message-ID
- <be6fef0d0912290012m3d64669fw4315960274baecb9@mail.gmail.com>
- In-Reply-To
- <1a04eebf0912282247p6975a96el8076cb39378bd104@mail.gmail.com>
Hi,
On Tue, Dec 29, 2009 at 2:47 PM, Fyn Fynn <fynfynn@gmail.com> wrote:
Show 11 quoted lines
> The exact same git reset command that works in 1.6.4, fails to work > under 1.6.6: > > $ GIT_WORK_TREE=$HOME/rawdata/ GIT_DIR=$HOME/rawdata/.git > /usr/local/git-1.6.6/bin/git reset --hard > fatal: hard reset requires a work tree > $ GIT_WORK_TREE=$HOME/rawdata/ GIT_DIR=$HOME/rawdata/.git > /usr/local/git-1.6.4/bin/git reset --hard > HEAD is now at 77ec73f... > > What gives?
perhaps you should also specify the --exec-path option or GIT_EXEC_PATH environment variable.
Assuming a full installation in /usr/local/git-1.6.6/ and thus that the git commands are installed at /usr/local/git-1.6.6/libexec/git-core/, the reset for 1.6.6 would look like this:
$ GIT_WORK_TREE=$HOME/rawdata/ \ GIT_DIR=$HOME/rawdata/.git \ GIT_EXEC_PATH=/usr/local/git-1.6.6/libexec/git-core/ \ /usr/local/git-1.6.6/bin/git reset --hard
-- Cheers, Ray Chuan