git enabling a gitignore code example
Example 1: how to generate gitignore file
echo "
bin/**
lib/**
pyvenv.cfg
**.pyc
" > .gitignore
cat .gitignore
Example 2: apply gitignore to current commit
#First commit all changes
git rm -r --cached .
git add .
git commit -m ".gitignore updated"