gitignore all in folder code example Example 1: gitignore folder in .gitignore: folder/ Example 2: gitignore all files and folders in only one folder * */ !.gitignore