Updated .gitignore to exclude .txt files code example
Example 1: git ignore not saving changes
git rm -rf --cached .
git add .
Example 2: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep