gitignore all txt files in a directory code example Example: git ignore all files and folders in folder * */ !.gitignore