.gitignore文件的使用

1.新建了一个test2文件

2.使用git status命令发现test2文件出现在为跟踪状态中

3.创建.gitignore文件,输入test2

4.使用git status命令察看,发现未跟踪状态中没有test2文件了,但是.gitignore出现了,自己可以在.gitignore文件中添加进去

vi test2
git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    test2
nothing added to commit but untracked files present (use "git add" to track)
vi  .gitignore
git status
# On branch master
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#    .gitignore
nothing added to commit but untracked files present (use "git add" to track)

 

posted on 2013-04-25 01:05  只愿软禁  阅读(206)  评论(0)    收藏  举报