git clone clear cache code example Example 1: git clean cache $ git rm -r --cached . Example 2: how to clear git status git rm -r --cached .