coding tips

Ignore files in git without editing .gitignore

You work on a repository where the .gitignore file is defined globally and already tracked by git, but you have some files in your local directory that you don’t want to be tracked (logs, or build files, *.pyc etc.) and would like to ignore them (because who doesn’t like git status to show “working tree clean” or the status bar in zsh to be green).