ignore file of dir using git code example Example 1: git ignore all files and folders in folder * */ !.gitignore Example 2: git ignore folder command $ touch .gitignore