Git Ignore Scenarios
Broadly, there are three scenarios where one might want to ignore files.
-
Specific to personal workflow
modify .git/info/exclude
-
Specific to project secrets
Scenarios like .env files for running a project locally. Here you can modifiy the repo level
.gitignore -
Always ignore
If certain files should be ignored regardless of sitatuion, this can be configured globally.
Unless otherwise configured in the ~/.gitconfig, the ignore file will be found at $XDG_CONFIG_HOME/git/ignore. if that value is not set or empty, check$HOME/.config/git/ignore.
References
https://git-scm.com/docs/gitignore