天天看點

建立git項目時未添加.gitignore檔案而後添加的方法

1.cd ->git program path

2.touch .gitignore

3.vim .gitignore

1). obey the rule of .gitignore

2).e.g. /build/

3).e.g. temp.o

4).*.o //all file with suffix of .o

4.git status //check status of git,find the untracked files:.gitignore

5.git add .gitignore

6.git commit -m updated.gitignore

7.git push