using a gitignore file to ignore a txt file code example Example: how to git ignore a file git config --global core.excludesfile ~/.gitignore_global