Easily Ignore Files With Git

Git allows you to ignore files in a project via .gitignore files. For certain types of projects there are files you (almost) always want to ignore. For example, when writing Python software I do not want to commit any *.pyc files or various installation files related to pip.

I could create my .gitignore file by hand, but nowadays I like to use this terrific service: It provides a web and command-line interface for generating .gitignore files that will ignore the files you generally do not want to commit, based on the programming language(s) you are using. For example, this is what it creates for Python projects.

The site explains how to use the service from the command-line if you want. Personally that is what I prefer, and I have an alias setup so I can run, for example, git ignore-types python > .gitignore. If you’re a programmer using Git then I definitely recommend for whenever you need to create a .gitignore file for a new project. I have found it to be a great utility service.

2 thoughts on “ Easily Ignore Files With Git

Add Your Thoughts

Fill in your details below or click an icon to log in: Logo

You are commenting using your 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