how to ignore files in directory git code example Example 1: git exclude folder directory_to_exclude/ Example 2: git ignore all files and folders in folder * */ !.gitignore