gitignore Files… Are You Still Creating Them Manually?

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:

Screen Shot 2014-04-14 at 16.55.32

# 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:

Screen Shot 2014-04-14 at 17.11.35

...
### 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:

Screen Shot 2014-04-14 at 17.12.24

# 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.

, , , , , , ,

  1. Leave a comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: