Compare commits
9 Commits
a8029669af
...
D
Author | SHA1 | Date | |
---|---|---|---|
ca358d7dcb | |||
572f5215ce | |||
9d867fc271 | |||
515dd2b9c4 | |||
7fca44eac8 | |||
ce2b85da59 | |||
df3218e422 | |||
73624ddf35 | |||
a4039843d6 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
*.swp
|
||||
*.h
|
||||
hello
|
||||
*.pyc
|
||||
|
1
notes/.gitignore
vendored
Normal file
1
notes/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.pyc
|
@@ -98,3 +98,55 @@ git cat-file -p D^0 # 展示里程碑D及其提交
|
||||
|
||||
### 2.8.4.4 git diff
|
||||
|
||||
```bash
|
||||
git diff B A # 比较B和A里程碑
|
||||
git diff A # 比较工作区和里程碑A
|
||||
git diff --cached A
|
||||
git diff
|
||||
git diff --cached
|
||||
git diff HEAD
|
||||
```
|
||||
|
||||
```bash
|
||||
git diff --word-diff
|
||||
```
|
||||
|
||||
### 2.8.4.5 git blame
|
||||
|
||||
可以追溯指出是谁在什么时候,什么版本引入的代码
|
||||
|
||||
```
|
||||
git blame <filename>
|
||||
git blame -L <n,m> <filename> # 查看某几行
|
||||
```
|
||||
|
||||
### 2.8.4.6 git bisect
|
||||
|
||||
用于二分查找什么时候引入的代码
|
||||
```bash
|
||||
git bisect start # 开始二分查找
|
||||
git bisect bad # 设置当前版本为坏版本
|
||||
git bisect good G # 设置里程碑G为好版本
|
||||
git bisect reset # 结束
|
||||
```
|
||||
|
||||
标记错误,恢复
|
||||
```bash
|
||||
git bisect log > logfile # 打开logfile,删除标记错误的行
|
||||
git bisect reset
|
||||
git bisect replay logfile # 用logfile恢复进度
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
1
welcome.txt
Normal file
1
welcome.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello world
|
Reference in New Issue
Block a user