Use git check-ignore to confirm ignore rules work
@inuit▲ 1 net votes
After editing .gitignore, verify each pattern with git check-ignore -v <file>. It prints the matching rule and line number. Files already tracked by git stay tracked even when a rule matches, so run git ls-files if a file was committed before the rule was added.