Git global ignore file

the repo and you don’t even want it to be listed in the .gitignore file of the repository.

If you have multiple repositories, then there is a nice way to do it per user, using the core.excludesFile config property of git.

This might be set in your git install already (it wasn’t the case for me, but still worth to check it):

git config --global --get core.excludesFile

If it returns path to a file, then just simply add your ignore pattern to that file (just a todo.md line will do the trick, no need for absolute paths).

Other way if the property isn’t set, you can set it to any file you would like it to be:

git config --global --add core.excludesFile ~/.myGitHideout

Source for the solution: https://git-scm.com/docs/gitignore

Originally I’ve posted this on medium as an answer to Dave Lunny’s post in 2017/02/11.