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
I could create my
.gitignore file by hand, but nowadays I like to use this terrific service: gitignore.io. 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 gitignore.io for whenever you need to create a
.gitignore file for a new project. I have found it to be a great utility service.