This is always a pain…you are starting up a new project, you initialized your repo. As you are about to run the command:

git add --all

you realized some of these files shouldn’t be tracked! What do you do? Head over to the “gitignore” repo on github. A repo for starter .gitignore files for various languages.

As a side note, git has a global configuration to apply the rules of one .gitignore file to all of your projects on the machine:

git config --global core.excludesfile ~/.global_ignore