# git reset

2 messages from 2017-08-16 to 2017-08-16. Participants: Efim Goncharuk, Junio C Hamano.
Thread: https://gitlist.dev/t/46604

## Efim Goncharuk, 2017-08-16 12:21

Subject: git reset
Message-ID: <34910856-7DE9-41A0-A7A6-B572B1C88C1F@gmail.com>
URL: https://gitlist.dev/e/34910856-7DE9-41A0-A7A6-B572B1C88C1F%40gmail.com

```
Hello,

Starting from git v.2.13.0 onwards (v 2.12.2 works fine)

git reset --hard with --work-tree and --git-dir options does not move HEAD to hash/tag specified. HEAD remains on same position.

Example:

> git --work-tree=lib/core --git-dir=lib/core/.git/ reset --hard 0.1.0


Note:
on another hand
> git -C lib/core reset --hard 0.1.0


Regards,
Efim Goncharuk


```

## Junio C Hamano, 2017-08-16 17:06

Subject: Re: git reset
Message-ID: <xmqqziazo31d.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqziazo31d.fsf%40gitster.mtv.corp.google.com
In-Reply-To: <34910856-7DE9-41A0-A7A6-B572B1C88C1F@gmail.com>

```
Efim Goncharuk <efimster@gmail.com> writes:

> Starting from git v.2.13.0 onwards (v 2.12.2 works fine)
>
> git reset --hard with --work-tree and --git-dir options does not move HEAD to hash/tag specified. HEAD remains on same position.
>
> Example:
>
>> git --work-tree=lib/core --git-dir=lib/core/.git/ reset --hard 0.1.0
>
>
> Note:
> on another hand
>> git -C lib/core reset --hard 0.1.0

... "works", I presume.

Thanks for a report.

A quick bisection points at f57f37e2 ("files-backend: remove the use
of git_path()", 2017-03-26), which is not unexpected.  I didn't dig
further and do not expect have time to do so myself for some time,
though.


```
