git ignore, ignore all files in directory code example Example 1: git exclude folder directory_to_exclude/ Example 2: gitignore all log files *.log !spec/*.log