Find the most suitable .gitignore content

von tobonaut

It is a real challenge to write a suitable .gitignore file. Nobody wants .DS_Store or .class files in the related git repository.

Github provides a own repository which contains a lot of ignore files for a huge amount of different programming languages and frameworks.

https://github.com/github/gitignore

I miss the IDE-specific entries like .proj or *.idea* files, but the repository gives a nice idea what should your *.gitignore file contain.

May ignore file for a simple java application looks like:

# Generic files to ignore
*~
*.lock
*.DS_Store
*.swp
*.outi

# Java specific
*.class
hs_err_pid*
*.jar
*.war
target/*

# Project files
*.iml
*.idea

What is the content of your **.gitignore* file of choice?

Advertisements