# creates gitignore file $ touch .gitignore
You can ignore entire directories, just by including their paths and putting a / on the end: 1 2 node_modules/ logs/
$ echo debug.log >> .gitignore $ git rm --cached debug.log rm 'debug.log' $ git commit -m "Start ignoring debug.log"
git rm -rf --cached . git add .
git config --global core.excludesfile ~/.gitignore_global
echo " bin/** lib/** pyvenv.cfg **.pyc " > .gitignore cat .gitignore