Docs say:
git reset [-q] [<tree-ish>] [--] <paths>...
This form resets the index entries for all
<paths>
to their state at<tree-ish>
. (It does not affect the working tree or the current branch.)This means that
git reset <paths>
is the opposite ofgit add <paths>
.
I kinda think that the "...this means that git reset is the opposite of git add..." is wrong.
If git add
copies from working directory to the index, one might think that the opposite of that copies from index to working directory.
But this form of git reset
copies from a treeish to the index and git checkout-index
would actually do the opposite.
How is it the opposite of git add
? If it is not opposite, is it worth trying to update the docs?