美文网首页
git提交忽略文件配置

git提交忽略文件配置

作者: 极简架构 | 来源:发表于2023-04-27 15:50 被阅读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
    

    相关文章

      网友评论

          本文标题:git提交忽略文件配置

          本文链接:https://www.haomeiwen.com/subject/gitijdtx.html