Add to .gitignore You can quickly add a file to your git repository’s gitignore from the source control view or using the Git: Add to .gitignore command.