gitignore don't ignore specific file code example
Example 1: .gitignore file not ignoring the file
git rm -r --cached .
git add .
git commit -m “.gitignore is now working”
Example 2: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep
Example 3: gitignore all log files
*.log
!spec/*.log