全局设置
打开gitbash,查看配置,
git config --list
创建.gitignore文件
.DS_Store */.DS_Store *.class *.iws *.iml *.ipr .idea .idea/* *.bak target target/* .gradle/ .DS_Store .project .settings/ *.pyc *.log *.stats *.apk *.ap_ *.dex gen/ local.properties proguard/ *.pbxuser *.mode1v3 *.mode2v3 *.perspectivev3 xcuserdata *.xccheckout *.moved-aside *.hmap *.ipa .metadata/ .metadata/* *.log pids *.pid *.seed lib-cov coverage .grunt .lock-wscript build/Release node_modules设置全局ignore
git config --global core.excludesfile G:/xxx/xxx/xxx/.gitignore
设置单个仓库的ignore
在仓库中设置.gitignore文件
修改.git/info/exclude 文件
修改.git/config 文件中的core.excludesfile
使用 git config core.excludesfile 命令