reset: update documentation to require only tree-ish with paths
When resetting with paths, we no longer require a commit argument, but
only a tree-ish. Update the documentation and synopsis accordingly.
Signed-off-by: Martin von Zweigbergk <martinvonz@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Martin von Zweigbergk12 years agocommitted byJunio C Hamano
In the first and second form, copy entries from <commit> to the index.
In the first and second form, copy entries from <tree-ish> to the index.
In the third form, set the current branch head (HEAD) to <commit>, optionally
modifying index and working tree to match. The <commit> defaults to HEAD
in all forms.
modifying index and working tree to match. The <tree-ish>/<commit> defaults
to HEAD in all forms.
'git reset' [-q] [<commit>] [--] <paths>...::
'git reset' [-q] [<tree-ish>] [--] <paths>...::
This form resets the index entries for all <paths> to their
state at <commit>. (It does not affect the working tree, nor
state at <tree-ish>. (It does not affect the working tree, nor
the current branch.)
+
This means that `git reset <paths>` is the opposite of `git add
@ -34,9 +34,9 @@ Alternatively, using linkgit:git-checkout[1] and specifying a commit, you
@@ -34,9 +34,9 @@ Alternatively, using linkgit:git-checkout[1] and specifying a commit, you
can copy the contents of a path out of a commit to the index and to the