git config --global core.excludesfile ~/.gitignore_global
git update-index --skip-worktree path/to/file.txt