Skip to content

Commit 68480f4

Browse files
add
1 parent 6e914da commit 68480f4

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

note/git教程.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,14 @@ git status
8080
git reset --hard commit_id
8181
```
8282

83+
## 查看
84+
```
85+
git status
86+
git status -s
87+
git log
88+
```
89+
90+
8391
## 分支管理
8492

8593
查看分支:
@@ -106,6 +114,18 @@ git checkout -b dev
106114

107115
## .gitignore
108116

117+
首先,在你的工作区新建一个名称为.gitignore的文件。
118+
**然后,把要忽略的文件名填进去,Git就会自动忽略这些文件。**
119+
120+
不需要从头写.gitignore文件,GitHub已经为我们准备了各种配置文件,只需要组合一下就可以使用了。
121+
所有配置文件可以直接在线浏览:https://github.com/github/gitignore
122+
123+
比如说,不想把a.out文件加入git,那么在.gitignore的文件里面的内容是:
124+
```
125+
*.o
126+
*.out
127+
```
128+
109129
## 参考
110130

111131
https://gist.github.com/285571052/72fe4e85290d170b9de4634b6ad8c082

0 commit comments

Comments
 (0)