# git reset --merge documentation improvments

3 messages from 2011-11-23 to 2011-11-23. Participants: Philippe Vaucher, Vincent van Ravesteijn.
Thread: https://gitlist.dev/t/29006

## Philippe Vaucher, 2011-11-23 08:31

Subject: git reset --merge documentation improvments
Message-ID: <CAGK7Mr59bN8rjhLHAK0Vq=bOBBHG=N02CgGe-np=OBdTyS+rsA@mail.gmail.com>
URL: https://gitlist.dev/e/CAGK7Mr59bN8rjhLHAK0Vq%3DbOBBHG%3DN02CgGe-np%3DOBdTyS%2BrsA%40mail.gmail.com

```
Hello,

The current documentation for --merge is:

"Resets the index [1] and updates the files in the working tree that
are different between <commit> and HEAD, but keeps those which are
different between the index [2] and working tree"

I think this is confusing, because [1] is the *after-reset* index and
[2] is the *before-reset* index. If you fail to realise this it looks
like this "resets index (so index is empty) and then updates worktree
but skip files staged from index" --> "but there's nothing staged, the
index was reset!"

I think a better sentence would be:

"Updates the files in the working tree that are different between
<commit> and HEAD, but keeps those which are different between the
index and working tree, and finally resets the index."

Or something along those lines.

Philippe

```

## Vincent van Ravesteijn, 2011-11-23 08:57

Subject: Re: git reset --merge documentation improvments
Message-ID: <4ECCB565.9020706@lyx.org>
URL: https://gitlist.dev/e/4ECCB565.9020706%40lyx.org
In-Reply-To: <CAGK7Mr59bN8rjhLHAK0Vq=bOBBHG=N02CgGe-np=OBdTyS+rsA@mail.gmail.com>

```
Op 23-11-2011 9:31, Philippe Vaucher schreef:
> Hello,
>
> The current documentation for --merge is:
>
> "Resets the index [1] and updates the files in the working tree that
> are different between<commit>  and HEAD, but keeps those which are
> different between the index [2] and working tree"
>
> I think this is confusing, because [1] is the *after-reset* index and
> [2] is the *before-reset* index.

You mean that you read that the *after-reset* index is reset ? They both 
refer to the *before-reset* index.

>   If you fail to realise this it looks
> like this "resets index (so index is empty) and then updates worktree
> but skip files staged from index" -->  "but there's nothing staged, the
> index was reset!"

The misunderstanding comes from the added "then".

>
> I think a better sentence would be:
>
> "Updates the files in the working tree that are different between
> <commit>  and HEAD, but keeps those which are different between the
> index and working tree, and finally resets the index."

There is nothing to update as long as the index is not reset.

Vincent

```

## Philippe Vaucher, 2011-11-23 11:39

Subject: Re: git reset --merge documentation improvments
Message-ID: <CAGK7Mr4UGc3jx2AQpRK_sotWHU-ibmGz87jx4hi-==8qY04QOg@mail.gmail.com>
URL: https://gitlist.dev/e/CAGK7Mr4UGc3jx2AQpRK_sotWHU-ibmGz87jx4hi-%3D%3D8qY04QOg%40mail.gmail.com
In-Reply-To: <4ECCB565.9020706@lyx.org>

```
>> "Updates the files in the working tree that are different between
>> <commit>  and HEAD, but keeps those which are different between the
>> index and working tree, and finally resets the index."
>
> There is nothing to update as long as the index is not reset.

Well then I simply don't understand what --merge does. Is it like
--keep but instead of failing when a file-to-be-overwritten has
changes it simply ignores the overwriting and continues?

Philippe

```
