Sometimes a project tracks a file that every developer edits locally, such as a config with a database host. You change it for your machine and then see it in every git status. There is a flag for that, with a big warning attached.
git update-index --skip-worktree config/local.php
Git now treats the file as unchanged, so it stays out of git status and out of git commit -a. To undo it:
git update-index --no-skip-worktree config/local.php
To find out which files are marked in a repository, the tag S in git ls-files -v shows them:
git ls-files -v | grep '^S'
Now the caveat, and it is a big one. The manual says the bit was made for sparse checkouts, not for ignoring changes. It states that git does not provide a way to ignore changes to tracked files and that these bits may not work as expected. If the file changes upstream, a pull or merge can still write it or run into conflicts, and then you have to clear the bit by hand.
The manual points to git sparse-checkout for the sparse case. For local settings, a better route is usually a file that is not tracked at all, with a committed config.example next to it. I would use skip-worktree only when I cannot change how the project is set up.
Further reading: git update-index, skip-worktree (Git documentation)
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more