1GIT-UNDO(1)                       Git Extras                       GIT-UNDO(1)
2
3
4

NAME

6       git-undo - Remove latest commits
7

SYNOPSIS

9       git-undo [<commitcount>] [-s, --soft, -h, --hard]
10

DESCRIPTION

12       Removes the latest commits.
13

OPTIONS

15       --soft or -s
16
17       This  is  the  default,  only  rolls back the commit but changes remain
18       un-staged.
19
20       --hard or -h
21
22       This option wipes your commit(s), so that your changes cannot be recov‐
23       ered. Use with care. To avoid being confused with --help, there will be
24       a confirmation when -h is specified.
25
26       <commitcount>
27
28       Number of commits to remove. Defaults to 1, thus remove the latest com‐
29       mit.
30

EXAMPLES

32       Removes the latest commit.
33
34
35
36           $ git undo
37
38
39
40       Remove the latest 3 commits:
41
42
43
44           $ git undo 3
45
46
47

AUTHOR

49       Written   by  Kenneth  Reitz  <me@kennethreitz.com>  and  Nick  Lombard
50       <github@jigsoft.co.za>
51

REPORTING BUGS

53       <https://github.com/tj/git-extras/issues>
54

SEE ALSO

56       <https://github.com/tj/git-extras>
57
58
59
60                                  April 2018                       GIT-UNDO(1)
Impressum