A .gitignore file for Intellij and Eclipse with Maven

October 12, 2012 | Comments
Tags: Tips

I often find myself having to fiddle about with ignore settings in various IDEs, so I thought I’d put together a simple general purpose solution that will ignore all the usual suspects for Intellij and Eclipse within a Maven reactor build (even works on a Mac).

Here it is:

# Eclipse

# Intellij

# Mac

# Maven

If you place this in .gitignore the root directory of your project, the ignore settings will be applied to all sub-directories automatically.

Finally, no more accidental commits of /target into the repo.

You may also want know how to purge the commit history to get rid of those old bloating commits, or perhaps an accidental commit of a password. If so the GitHub people have written an excellent tutorial.


Related Posts

Useful? Consider a small donation: 1KzTSfqjF2iKCduwz59nv2uqh1W2JsTxZH

Got an opinion? Comments are welcome!

Want more? Take a look at the following:

Simple Scaffolding
How to deploy dynamic sites with git
An nginx configuration file for Dropwizard with static content
How to deploy static sites with git
How to recover your bitcoins from a failed hard drive
How to build a Builder
How to recover lost bitcoins from an Android wallet
7 refactorings I couldn't live without
9 top tips to understand new code
Avoiding duplicate test results with Hudson

comments powered by Disqus