how to ignore file within a folder git code example
Example 1: git remove file from gitignore
git rm --cached
Example 2: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep
git rm --cached
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep