We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1908ff commit 0640574Copy full SHA for 0640574
README.md
@@ -147,4 +147,15 @@ skillful at git
147
148
### 以新增一个 commit 的方式还原某一个 commit 的修改
149
150
- git revert <commit-id>
+ git revert <commit-id></commit-id>
151
+
152
+### 回到某个 commit 的状态,并删除后面的 commit
153
154
+ git reset <commit-id> #默认就是-mixed参数。
155
156
+ git reset –mixed HEAD^ #回退至上个版本,它将重置HEAD到另外一个commit,并且重置暂存区以便和HEAD相匹配,但是也到此为止。工作区不会被更改。
157
158
+ git reset –soft HEAD~3 #回退至三个版本之前,只回退了commit的信息,暂存区和工作区与回退之前保持一致。如果还要提交,直接commit即可
159
160
+ git reset –hard <commit-id> #彻底回退到指定commit-id的状态,暂存区和工作区也会变为指定commit-id版本的内容
161
0 commit comments