Do you use Git? Do you create your .gitignore
files manually?
If yes, here is an on-line tool that can make your life easier.
gitignore.io
I’m talking about gitignore.io. It is based on a very simple idea: As of this writing, it hosts 170 different .gitignore
templates based on various operating systems, IDEs and programming languages. You type keywords about your environment such as the name of your IDE, your build automation tool, etc. And you get back a tailored .gitignore
file.
.gitignore for IntelliJ IDEA
Let’s see some sample templates: I’m an IntelliJ IDEA user. I get the following template from gitignore.io:
# Created by http://www.gitignore.io ### Intellij ### # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm ## Directory-based project format .idea/ # if you remove the above rule, at least ignore user-specific stuff: # .idea/workspace.xml # .idea/tasks.xml # and these sensitive or high-churn files: # .idea/dataSources.ids # .idea/dataSources.xml # .idea/sqlDataSources.xml # .idea/dynamic.xml ## File-based project format *.ipr *.iws *.iml ## Additional for IntelliJ out/ # generated by mpeltonen/sbt-idea plugin .idea_modules/ # generated by JIRA plugin atlassian-ide-plugin.xml # generated by Crashlytics plugin (for Android Studio and Intellij) com_crashlytics_export_strings.xml
.gitignore for Maven
If I add Maven
after IntelliJ
in the search field then I get the following section in addition to the template above:
... ### Maven ### target/ pom.xml.tag pom.xml.releaseBackup pom.xml.next release.properties
.gitignore for Eclipse and Gradle
Let’s say that you’re using Eclipse IDE and your project is automated by Gradle. You get the following:
# Created by http://www.gitignore.io ### Eclipse ### *.pydevproject .metadata .gradle bin/ tmp/ *.tmp *.bak *.swp *~.nib local.properties .settings/ .loadpath # External tool builders .externalToolBuilders/ # Locally stored "Eclipse launch configurations" *.launch # CDT-specific .cproject # PDT-specific .buildpath # sbteclipse plugin .target # TeXlipse plugin .texlipse ### Gradle ### .gradle build/
Command Line Alternative
You can also use the same functionality from the command line. gitignore.io has detailed documentation about this installation.
