What’s recommended .gitignore for Scala/sbt project in IntelliJ IDEA?

EDIT After discovering Joe:

Just ask Joe to take care of your .gitignore

Original Answer:

Since you’re using Scala you should add:

target
*.class

These can be generated back easily and could be machine dependent.

If you’re going to use IntelliJ then the following:

*.iml
*.ipr
*.iws
.idea
out

The .idea folder and the .iml files are created and used only by IntelliJ, other IDEs will just ignore them. They can be generated easily by IntelliJ if needed, try deleting your .idea folder and then open the project in IntelliJ and, lo and behold the first thing it does is generate the .idea folder and it’s contents.

For Vim:

tags
.*.swp
.*.swo

For Eclipse(Scala IDE):

build
.classpath
.project
.settings
org.scala-ide.sdt.core/META-INF/MANIFEST.MF
org.scala-ide.sdt.update-site/site.xml`

For macOS:

.DS_Store

I think this covers the most popular IDEs for Scala. If someone’s using an IDE not covered, you’ll have to look around for what temporary and build files they create.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)