Skip to content

Commit 6e90f7b

Browse files
trastgitster
authored andcommitted
Documentation/reset: move "undo permanently" example behind "make topic"
I consider the latter usage more important. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 8bb95bb commit 6e90f7b

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Documentation/git-reset.txt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -128,19 +128,6 @@ edit the message further, you can give -C option instead.
128128
+
129129
See also the --amend option to linkgit:git-commit[1].
130130

131-
Undo commits permanently::
132-
+
133-
------------
134-
$ git commit ...
135-
$ git reset --hard HEAD~3 <1>
136-
------------
137-
+
138-
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
139-
and you do not want to ever see them again. Do *not* do this if
140-
you have already given these commits to somebody else. (See the
141-
"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
142-
the implications of doing so.)
143-
144131
Undo a commit, making it a topic branch::
145132
+
146133
------------
@@ -156,6 +143,19 @@ current HEAD.
156143
<2> Rewind the master branch to get rid of those three commits.
157144
<3> Switch to "topic/wip" branch and keep working.
158145

146+
Undo commits permanently::
147+
+
148+
------------
149+
$ git commit ...
150+
$ git reset --hard HEAD~3 <1>
151+
------------
152+
+
153+
<1> The last three commits (HEAD, HEAD^, and HEAD~2) were bad
154+
and you do not want to ever see them again. Do *not* do this if
155+
you have already given these commits to somebody else. (See the
156+
"RECOVERING FROM UPSTREAM REBASE" section in linkgit:git-rebase[1] for
157+
the implications of doing so.)
158+
159159
Undo a merge or pull::
160160
+
161161
------------

0 commit comments

Comments
 (0)