remove all cahce file from git code example Example 1: git clean cache $ git rm -r --cached . Example 2: git remove cached git rm -r --cached <name-of-dir>