ignore file extension git code example Example 1: gitignore file without extension * !/**/ !*.* Example 2: git ignore by file extension *.json !spec/*.json