gitignore how to ignore a file code example
Example 1: gitignroe remove folder
git rm -r --cached some-directory
git commit -m 'Remove the now ignored directory "some-directory"'
git push origin master
Example 2: how to git ignore a file
git config --global core.excludesfile ~/.gitignore_global
Example 3: git ignore not saving changes
git rm -rf --cached .
git add .
Example 4: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep