File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ Git是一个“分布式版本管理工具”,简单的理解版本管理工
86
86
* [ clone下来指定的单一分支] ( #clone下来指定的单一分支 )
87
87
* [ 忽略某个文件的改动] ( #忽略某个文件的改动 )
88
88
* [ 忽略文件的权限变化] ( #忽略文件的权限变化 )
89
- * [ 以最后提交的顺序排序Git分支 ] ( #以最后提交的顺序排序Git分支 )
89
+ * [ 以最后提交的顺序列出所有Git分支 ] ( #以最后提交的顺序列出所有Git分支 )
90
90
* [ 在commit log中查找相关内容] ( #在commit-log中查找相关内容 )
91
91
* [ 把暂存区的指定file放到工作区中] ( #把暂存区的指定file放到工作区中 )
92
92
* [ 强制推送] ( #强制推送 )
@@ -275,11 +275,11 @@ git revert <commit-id>
275
275
``` sh
276
276
git reset < commit-id> # 默认就是-mixed参数。
277
277
278
- git reset –mixed HEAD^ # 回退至上个版本,只保留源码,回退commit和index信息
278
+ git reset –mixed HEAD^ # 回退至上个版本,它将重置HEAD到另外一个commit,并且重置暂存区以便和HEAD相匹配,但是也到此为止。工作区不会被更改。
279
279
280
- git reset –soft HEAD~3 # 回退至三个版本之前,只回退了commit的信息,不会恢复到**暂存区**一级 。如果还要提交,直接commit即可
280
+ git reset –soft HEAD~3 # 回退至三个版本之前,只回退了commit的信息,暂存区和工作区与回退之前保持一致 。如果还要提交,直接commit即可
281
281
282
- git reset –hard < commit-id> # 彻底回退到指定commit-id的状态,本地的源码也会变为上一个版本的内容
282
+ git reset –hard < commit-id> # 彻底回退到指定commit-id的状态,暂存区和工作区也会变为指定commit-id版本的内容
283
283
```
284
284
285
285
## 修改上一个commit的描述
@@ -511,7 +511,7 @@ git update-index --no-assume-unchanged path/to/file
511
511
git config core.fileMode false
512
512
```
513
513
514
- ## 以最后提交的顺序排序Git分支
514
+ ## 以最后提交的顺序列出所有Git分支
515
515
最新的放在最上面
516
516
517
517
``` sh
You can’t perform that action at this time.
0 commit comments