To tell git which files in a project to ignore
Create the .gitignore
file in the root of your git project
vim .gitignore
Add any files that should not be added to the repo into the ignore file
myDBconfig.yml
sesitiveData.txt
config.yml
Ignore a whole directory
/test-dir/
Show ignored files
git ls-files . --ignored --exclude-standard --others