git设置全局忽略文件
2016-10-20 18:14
330 查看
项目传到git的时候只需要src,pom.xml,但是导入eclipse时候,会产生一些配置文件,比如.classpath,.project等文件,如果每个项目都去设置一遍ignore太麻烦了,所以从全局设置忽略文件,就不用每个项目都设置了。
1,在eclipse的工作空间(workspace)新建.gitignore文件,文件内容:
2,执行忽略文件全局配置的命令:
执行完以上命令后再执行git status,发现git工作空间干净的,说明全局变量配置成功
1,在eclipse的工作空间(workspace)新建.gitignore文件,文件内容:
/bin/ /target/ .classpath .gitignore .project .settings/
2,执行忽略文件全局配置的命令:
git config --global core.excludesfile ~/git_repository/.gitignore
执行完以上命令后再执行git status,发现git工作空间干净的,说明全局变量配置成功
evan@evan:~/git_repository/srs$ git status On branch test Your branch is up-to-date with 'origin/test'. nothing to commit, working directory clean
相关文章推荐
- Git设置全局忽略文件
- Git中设置全局ingore来忽略.DS_Store文件的方法
- 关于git忽略(局部忽略、全局忽略)文件和文件夹的设置方法
- Git忽略文件之设置全局gitignore规则文件
- git设置忽略文件
- git 全局忽略.DS_Store等文件
- git设置过滤忽略的文件或文件夹
- 设置SVN,Git忽略MAC的.DS_Store文件的方法
- 关于Git中忽略指定文件的设置
- git&github使用笔记(二)——Git设置文件忽略
- Git设置忽略文件/文件夹
- 设置GIT忽略文件权限
- git下忽略文件设置 [zt]
- SVN + GIT :Android Studio设置忽略文件
- Git设置忽略文件/文件夹
- Git设置忽略文件/文件夹
- Git代码托管时文件忽略设置
- Git 上传忽略文件设置 .ignore exclude
- git使用-设置项目忽略文件
- git :设置 object-c 的忽略文件