File tree Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Expand file tree Collapse file tree 1 file changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -128,19 +128,6 @@ edit the message further, you can give -C option instead.
128
128
+
129
129
See also the --amend option to linkgit:git-commit[1].
130
130
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
-
144
131
Undo a commit, making it a topic branch::
145
132
+
146
133
------------
@@ -156,6 +143,19 @@ current HEAD.
156
143
<2> Rewind the master branch to get rid of those three commits.
157
144
<3> Switch to "topic/wip" branch and keep working.
158
145
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
+
159
159
Undo a merge or pull::
160
160
+
161
161
------------
You can’t perform that action at this time.
0 commit comments