forked from iicd/git-learner
add 2.5 notes
This commit is contained in:
parent
32575fda96
commit
90fcb4ac61
16
notes/2.5_git_checkout.md
Normal file
16
notes/2.5_git_checkout.md
Normal file
@ -0,0 +1,16 @@
|
||||
## 2.5 Git Checkout
|
||||
|
||||
### 2.5.1 HEAD reset = checkout
|
||||
|
||||
查看当前的branch
|
||||
```bash
|
||||
git branch -v
|
||||
```
|
||||
|
||||
checkout到commit的父亲,使得head指针指向父提交,而不是branch
|
||||
```bash
|
||||
git checkout <commit>^
|
||||
```
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user