git提交忽略文件配置
2023-04-27 本文已影响0人
极简架构
git忽略提交的文件配置,项目根目录下添加 .gitignore 文件忽略git提交文件,添加需要提交忽略的文件即可,git commit时就会忽略该格式的文件。
Java参考: https://github.com/github/gitignore/blob/main/Java.gitignore 按需添加即可
#
# Java: https://github.com/github/gitignore/blob/main/Java.gitignore
#
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*
#
# Maven: https://github.com/github/gitignore/blob/main/Maven.gitignore
#
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar
# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath
#
# JetBrain: https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
#
.idea/
out/
.idea_modules/
*.iml
# Mac file ignore
.DS_Store