G
GitIgnore.pro
Back to Templates

Java .gitignore Template

Java projects with Maven and Gradle support

87K downloads
4.7/5.0
Updated 2024-01
.gitignore
25 lines
# 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*

How to Use This Template

  1. Copy the template content above
  2. Create a new file named .gitignore in your project root
  3. Paste the content into the file
  4. Customize the patterns for your specific project needs
  5. Commit the .gitignore file to your repository