Global gitignore

January 2024 | Configuring ignored files for all repositories on your computer

To have git ignore files (like .env, .DS_Store) across all repositories, add them to the global gitignore. By default, it is located at ~/.config/git/ignore.

The git folder and ignore file may have to be created by you. I find it super easy to open the config folder with VS Code with code ~/.config, then create the git/ignore file if necessary.

Once open, the files can be added. Mine looks something like this: