git ignore the whole folder code example
Example 1: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep
Example 2: git ignore folder command
$ touch .gitignore
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep
$ touch .gitignore