gitignore folder and everything in it code example Example 1: gitignore folder in .gitignore: folder/ Example 2: git ignore folder command $ touch .gitignore