在sourcetree中设置忽略提交文件,如下图所示
添加忽略内容为:
HELP.md /target/ !.mvn/wrapper/maven-wrapper.jar !**/src/main/**/target/ !**/src/test/**/target/ ### STS ### .apt_generated .classpath .factorypath .project .settings .springBeans .sts4-cache ### IntelliJ IDEA ### .idea *.iws *.iml *.ipr ### NetBeans ### /nbproject/private/ /nbbuild/ /dist/ /nbdist/ /.nb-gradle/ /build/ !**/src/main/**/build/ !**/src/test/**/build/ ### VS Code ### .vscode/
可能不会立刻生效,需要可以执行下面代码
git rm -r --cached . git add . git commit -m 'xxx' git push 分支
汇总:sourcetree设置忽略提交文件,这个很受用。
标签:src,git,target,imp,build,提交,### From: https://www.cnblogs.com/jelly12345/p/17349503.html