Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame^] | 1 | git-revert(1) |
| 2 | ============= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-revert - Revert an existing commit. |
| 7 | |
| 8 | SYNOPSIS |
| 9 | -------- |
| 10 | 'git-revert' [--edit | --no-edit] [-n] <commit> |
| 11 | |
| 12 | DESCRIPTION |
| 13 | ----------- |
| 14 | Given one existing commit, revert the change the patch introduces, and record a |
| 15 | new commit that records it. This requires your working tree to be clean (no |
| 16 | modifications from the HEAD commit). |
| 17 | |
| 18 | OPTIONS |
| 19 | ------- |
| 20 | <commit>:: |
| 21 | Commit to revert. |
| 22 | |
| 23 | -e|--edit:: |
| 24 | With this option, `git-revert` will let you edit the commit |
| 25 | message prior committing the revert. This is the default if |
| 26 | you run the command from a terminal. |
| 27 | |
| 28 | --no-edit:: |
| 29 | With this option, `git-revert` will not start the commit |
| 30 | message editor. |
| 31 | |
| 32 | -n|--no-commit:: |
| 33 | Usually the command automatically creates a commit with |
| 34 | a commit log message stating which commit was reverted. |
| 35 | This flag applies the change necessary to revert the |
| 36 | named commit to your working tree, but does not make the |
| 37 | commit. In addition, when this option is used, your |
| 38 | working tree does not have to match the HEAD commit. |
| 39 | The revert is done against the beginning state of your |
| 40 | working tree. |
| 41 | + |
| 42 | This is useful when reverting more than one commits' |
| 43 | effect to your working tree in a row. |
| 44 | |
| 45 | |
| 46 | Author |
| 47 | ------ |
| 48 | Written by Junio C Hamano <junkio@cox.net> |
| 49 | |
| 50 | Documentation |
| 51 | -------------- |
| 52 | Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>. |
| 53 | |
| 54 | GIT |
| 55 | --- |
| 56 | Part of the gitlink:git[7] suite |
| 57 | |