gitignore exclude all files with extension code example Example: gitignore all log files *.log !spec/*.log