使用Eclipse创建maven 多模块项目,提交的时候发现很多无用的文件需要剔除,所以.gitignore文件的书写显得尤为重要。重要的是需要忽略几个文件和几个文件夹 包括: .classpath .project .settings 里的配置文件 target 生成的.class 主要就是这些要忽略提交,包括子模块的。为了全局生效,我们只在父模块的.gitignore设置一次, 下面是文件内容 .settings/ .project *.class .classpath target 仅供参考
转载于:https://my.oschina.net/heiseguoguo/blog/911561