1
0
forked from iicd/git-learner
git-learner/notes/2.5_git_checkout.md
2024-08-16 10:39:20 +02:00

17 lines
220 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 2.5 Git Checkout
### 2.5.1 HEAD reset = checkout
查看当前的branch
```bash
git branch -v
```
checkout到commit的父亲使得head指针指向父提交而不是branch
```bash
git checkout <commit>^
```