gitignore all files with name code example
Example 1: how to git ignore a file
git config --global core.excludesfile ~/.gitignore_global
Example 2: git ignore content of a folder
# exclude everything
somefolder/*
# exception to the rule
!somefolder/.gitkeep
Example 3: gitignore all files and folders in only one folder
*
*/
!.gitignore