From: Thomas Rast <trast@student.ethz.ch>
To: <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v2 2/5] Documentation/reset: separate options by mode
Date: Sun, 18 Jul 2010 20:23:23 +0200 [thread overview]
Message-ID: <975d0001acbaf4f33fa9b51ce878a9247b8a9e5f.1279477130.git.trast@student.ethz.ch> (raw)
In-Reply-To: <cover.1279477130.git.trast@student.ethz.ch>
Remove all but -q from the OPTIONS section, and instead explain the
options separated by usage mode, since they only apply to one each.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
Documentation/git-reset.txt | 59 ++++++++++++++++++++++++-------------------
1 files changed, 33 insertions(+), 26 deletions(-)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index dbb810d..dca75b3 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -8,29 +8,39 @@ git-reset - Reset current HEAD to the specified state
SYNOPSIS
--------
[verse]
-'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
'git reset' [-q] [<commit>] [--] <paths>...
'git reset' --patch [<commit>] [--] [<paths>...]
+'git reset' [--soft | --mixed | --hard | --merge | --keep] [-q] [<commit>]
DESCRIPTION
-----------
-Sets the current head to the specified commit and optionally resets the
-index and working tree to match.
-
-This command is useful if you notice some small error in a recent
-commit (or set of commits) and want to redo that part without showing
-the undo in the history.
-
-If you want to undo a commit other than the latest on a branch,
-linkgit:git-revert[1] is your friend.
-
-The second and third forms with 'paths' and/or --patch are used to
-revert selected paths in the index from a given commit, without moving
-HEAD.
+In the first and second form, copy entries from <commit> to the index.
+In the third form, set the current branch to <commit>, optionally
+modifying index and worktree to match. The <commit> defaults to HEAD
+in all forms.
+
+'git reset' [-q] [<commit>] [--] <paths>...::
+ This form resets the index entries for all <paths> to their
+ state at the <commit>. (It does not affect the worktree, nor
+ the current branch.)
++
+This means that `git reset <paths>` is the opposite of `git add
+<paths>`.
+'git reset' --patch|-p [<commit>] [--] [<paths>...]::
+ Interactively select hunks in the difference between the index
+ and <commit> (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` (see
+linkgit:git-add[1]).
-OPTIONS
--------
+'git reset' [--<mode>] [<commit>]::
+ This form points the current branch to <commit> and then
+ updates index and working tree according to <mode>, which must
+ be one of the following:
++
+--
--soft::
Does not touch the index file nor the working tree at all, but
requires them to be in a good order. This leaves all your changed
@@ -59,22 +69,19 @@ OPTIONS
the given commit. If a file that is different between the
current commit and the given commit has local changes, reset
is aborted.
+--
--p::
---patch::
- Interactively select hunks in the difference between the index
- and <commit> (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` (see
-linkgit:git-add[1]).
+If you want to undo a commit other than the latest on a branch,
+linkgit:git-revert[1] is your friend.
+
+
+OPTIONS
+-------
-q::
--quiet::
Be quiet, only report errors.
-<commit>::
- Commit to make the current HEAD. If not given defaults to HEAD.
DISCUSSION
----------
--
1.7.2.rc3.317.gc287
next prev parent reply other threads:[~2010-07-18 18:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-16 9:44 [RFC PATCH 0/5] git-reset documentation changes Thomas Rast
2010-07-16 9:44 ` [RFC PATCH 1/5] Documentation/git-reset: reorder modes for soft-mixed-hard progression Thomas Rast
2010-07-16 9:44 ` [RFC PATCH 2/5] Documentation/reset: separate options by mode Thomas Rast
2010-07-16 20:43 ` Junio C Hamano
2010-07-18 18:23 ` [PATCH v2 0/5] git-reset documentation changes Thomas Rast
2010-07-18 18:23 ` [PATCH v2 1/5] Documentation/git-reset: reorder modes for soft-mixed-hard progression Thomas Rast
2010-07-18 18:23 ` Thomas Rast [this message]
2010-07-18 18:23 ` [PATCH v2 3/5] Documentation/reset: promote 'examples' one section up Thomas Rast
2010-07-18 18:23 ` [PATCH v2 4/5] Documentation/reset: reorder examples to match description Thomas Rast
2010-07-18 18:23 ` [PATCH v2 5/5] Documentation/reset: move "undo permanently" example behind "make topic" Thomas Rast
2010-07-16 9:44 ` [RFC PATCH 3/5] Documentation/reset: promote 'examples' one section up Thomas Rast
2010-07-16 9:44 ` [RFC PATCH 4/5] Documentation/reset: reorder examples to match description Thomas Rast
2010-07-16 9:44 ` [RFC PATCH 5/5] Documentation/reset: move "undo permanently" example behind "make topic" Thomas Rast
2010-07-16 21:00 ` [RFC PATCH 0/5] git-reset documentation changes Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=975d0001acbaf4f33fa9b51ce878a9247b8a9e5f.1279477130.git.trast@student.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).