Skip to main content

Git Ignore Scenarios

Broadly, there are three scenarios where one might want to ignore files.

  1. Specific to personal workflow

modify .git/info/exclude

  1. Specific to project secrets

    Scenarios like .env files for running a project locally. Here you can modifiy the repo level .gitignore

  2. 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