作用是让临时文件和中间文件都不提交到代码库中

工程相关的. gitignore  放在根目录

常用 的有:



操作系统或编辑器相关的全局模板
全局的模板:就是每一个git库都用应用到
如创建一个文件 ~/.gitignore_global  
然后运行
git config --global core.excludesfile ~/.gitignore_global

常用 的有:

Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# Logs and databases #
######################
*.log
*.sql
*.sqlite

# OS generated files #
######################
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db


.gitignore

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐