Can I ignore files locally without polluting the global git config for everyone else? I have untracked files that are spam in my git status but I don\'t want to commit git c
You have several options:
.gitignore
file in your working dir (or apply it automatically using topgit or some other such patch tool).$GIT_DIR/info/exclude
file, if this is specific to one tree.git config --global core.excludesfile ~/.gitignore
and add patterns to your ~/.gitignore
. This option applies if you want to ignore certain patterns across all trees. I use this for .pyc
and .pyo
files, for example.Also, make sure you are using patterns and not explicitly enumerating files, when applicable.