diff options
Diffstat (limited to 'Documentation/git-revert.txt')
-rw-r--r-- | Documentation/git-revert.txt | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/Documentation/git-revert.txt b/Documentation/git-revert.txt index b7d9ef7e47..f3519413e7 100644 --- a/Documentation/git-revert.txt +++ b/Documentation/git-revert.txt @@ -7,7 +7,10 @@ git-revert - Revert some existing commits SYNOPSIS -------- +[verse] 'git revert' [--edit | --no-edit] [-n] [-m parent-number] [-s] <commit>... +'git revert' --reset +'git revert' --continue DESCRIPTION ----------- @@ -23,7 +26,7 @@ throw away all uncommitted changes in your working directory, you should see linkgit:git-reset[1], particularly the '--hard' option. If you want to extract specific files as they were in another commit, you should see linkgit:git-checkout[1], specifically the `git checkout -<commit> -- <filename>` syntax. Take care with these alternatives as +<commit> \-- <filename>` syntax. Take care with these alternatives as both will discard uncommitted changes in your working directory. OPTIONS @@ -31,7 +34,7 @@ OPTIONS <commit>...:: Commits to revert. For a more complete list of ways to spell commit names, see - linkgit:gitrevisions[1]. + linkgit:gitrevisions[7]. Sets of commits can also be given but no traversal is done by default, see linkgit:git-rev-list[1] and its '--no-walk' option. @@ -80,14 +83,28 @@ effect to your index in a row. --signoff:: Add Signed-off-by line at the end of the commit message. +--strategy=<strategy>:: + Use the given merge strategy. Should only be used once. + See the MERGE STRATEGIES section in linkgit:git-merge[1] + for details. + +-X<option>:: +--strategy-option=<option>:: + Pass the merge strategy-specific option through to the + merge strategy. See linkgit:git-merge[1] for details. + +SEQUENCER SUBCOMMANDS +--------------------- +include::sequencer.txt[] + EXAMPLES -------- -git revert HEAD~3:: +`git revert HEAD~3`:: Revert the changes specified by the fourth last commit in HEAD and create a new commit with the reverted changes. -git revert -n master\~5..master~2:: +`git revert -n master{tilde}5..master{tilde}2`:: Revert the changes done by commits from the fifth last commit in master (included) to the third last commit in master @@ -95,14 +112,6 @@ git revert -n master\~5..master~2:: changes. The revert only modifies the working tree and the index. -Author ------- -Written by Junio C Hamano <gitster@pobox.com> - -Documentation --------------- -Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. - SEE ALSO -------- linkgit:git-cherry-pick[1] |