From: Martin von Zweigbergk Date: Wed, 16 Jan 2013 18:00:35 +0000 (-0800) Subject: reset: update documentation to require only tree-ish with paths X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bf44142f5464e913d99f9544787e59fc630f6cc9;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 978d8da50..a404b47b7 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -8,20 +8,20 @@ git-reset - Reset current HEAD to the specified state SYNOPSIS -------- [verse] -'git reset' [-q] [] [--] ... -'git reset' (--patch | -p) [] [--] [...] +'git reset' [-q] [] [--] ... +'git reset' (--patch | -p) [] [--] [...] 'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [] DESCRIPTION ----------- -In the first and second form, copy entries from to the index. +In the first and second form, copy entries from to the index. In the third form, set the current branch head (HEAD) to , optionally -modifying index and working tree to match. The defaults to HEAD -in all forms. +modifying index and working tree to match. The / defaults +to HEAD in all forms. -'git reset' [-q] [] [--] ...:: +'git reset' [-q] [] [--] ...:: This form resets the index entries for all to their - state at . (It does not affect the working tree, nor + state at . (It does not affect the working tree, nor the current branch.) + This means that `git reset ` is the opposite of `git add @@ -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 working tree in one go. -'git reset' (--patch | -p) [] [--] [...]:: +'git reset' (--patch | -p) [] [--] [...]:: Interactively select hunks in the difference between the index - and (defaults to HEAD). The chosen hunks are applied + and (defaults to HEAD). The chosen hunks are applied in reverse to the index. + This means that `git reset -p` is the opposite of `git add -p`, i.e. diff --git a/builtin/reset.c b/builtin/reset.c index 921afbe62..6032131a9 100644 --- a/builtin/reset.c +++ b/builtin/reset.c @@ -23,8 +23,8 @@ static const char * const git_reset_usage[] = { N_("git reset [--mixed | --soft | --hard | --merge | --keep] [-q] []"), - N_("git reset [-q] [--] ..."), - N_("git reset --patch [] [--] [...]"), + N_("git reset [-q] [--] ..."), + N_("git reset --patch [] [--] [...]"), NULL };