gitignore all folder except one code example Example: git ignore all files and folders in folder * */ !.gitignore