Sometimes you want git to ignore certain files that appear on your machine. You can do this in 3 ways:
.gitignore
file.gitignore
entries While it might be tempting to set it per project (other devs might benefit from it), you
.gitignore
file with stuff that may be quite irrelevant for othersYou can just put your patterns into another file, in your home directory on your machine (e.g. ~/.gitignore
).
Then, just feed it to git:
git config --global core.excludesfile ~/.gitignore
The file's effect will apply immediately if you do that from a repository. Neat.
untracked
for your personal code snippets or project files like Excel sheets