Git .gitignore

来源:互联网 发布:城市公交软件 编辑:程序博客网 时间:2024/05/15 21:40

我们看一个 .gitignore 文件的例子:

# no .a files*.a# but do track lib.a, even though you're ignoring .a files above!lib.a# only ignore the TODO file in the current directory, not subdir/TODO/TODO# ignore all files in the build/ directorybuild/# ignore doc/notes.txt, but not doc/server/arch.txtdoc/*.txt# ignore all .pdf files in the doc/ directorydoc/**/*.pdf
#IF GITIGNORE IS NOT WORKING,JUST RUN:# git rm -r --cached . # git add .# git commit -m ".gitignore is now working"