git配置全局ignore的步骤如下:
1、在用户目录文件夹下(我的是在C:\Users\jinweilu)创建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
2、打开gitbash,输入git config –global core.excludesFile ~/gitnore命令
3、输入查看命令git config –list,查看是否配置成功,如下图所示:
网友评论