Updated: 07 May 2023
Git ignore uses globbing patterns.
Ignore .env
file in current directory only and not .env
files which might occur further down the directory structure
# .gitignore
/.env
Find which .gitignore file entry is ignoring a particular file
git check-ignore --verbose file/to/check.cs