gitignore clear cache code example Example 1: git clean cache Click to copy$ git rm -r --cached . Example 2: git rm cached gitignore Click to copygit rm -r --cached .