git ignore all folder code example Example 1: git ignore folder command $ touch .gitignore Example 2: gitignore all files and folders in only one folder * */ !.gitignore