diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-09-07 22:24:38 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-09-07 22:24:38 (GMT) |
commit | 54f0bdc81103f45f12978b385a9519a235b03cc2 (patch) | |
tree | ee239eeafe0f59af72eca683e5e264b0c2a6fff5 /Documentation/git-reset.txt | |
parent | 8e4384fd4438a143af7125eb0f03312a318319fb (diff) | |
parent | 3c2eb80fe3f3c7efbb25e929df9f70d7c896a5ef (diff) | |
download | git-54f0bdc81103f45f12978b385a9519a235b03cc2.zip git-54f0bdc81103f45f12978b385a9519a235b03cc2.tar.gz git-54f0bdc81103f45f12978b385a9519a235b03cc2.tar.bz2 |
Merge branch 'tr/reset-checkout-patch'
* tr/reset-checkout-patch:
stash: simplify defaulting to "save" and reject unknown options
Make test case number unique
tests: disable interactive hunk selection tests if perl is not available
DWIM 'git stash save -p' for 'git stash -p'
Implement 'git stash save --patch'
Implement 'git checkout --patch'
Implement 'git reset --patch'
builtin-add: refactor the meat of interactive_add()
Add a small patch-mode testing library
git-apply--interactive: Refactor patch mode code
Make 'git stash -k' a short form for 'git stash save --keep-index'
Diffstat (limited to 'Documentation/git-reset.txt')
-rw-r--r-- | Documentation/git-reset.txt | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index abb25d1..469cf6d 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -10,6 +10,7 @@ SYNOPSIS [verse] 'git reset' [--mixed | --soft | --hard | --merge] [-q] [<commit>] 'git reset' [-q] [<commit>] [--] <paths>... +'git reset' --patch [<commit>] [--] [<paths>...] DESCRIPTION ----------- @@ -23,8 +24,9 @@ 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 form with 'paths' is used to revert selected paths in -the index from a given commit, without moving HEAD. +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. OPTIONS @@ -50,6 +52,15 @@ OPTIONS and updates the files that are different between the named commit and the current commit in the working tree. +-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]). + -q:: Be quiet, only report errors. |