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)
浙公网安备 33010602011771号