git rm cached file code example
Example 1: git remove cached
git rm -r --cached <name-of-dir>
Example 2: git remove cached directory
git rm -r --cached [directory]
Example 3: git rm cached
$ git rm --cached filename
Example 4: remove git
rm -rf .git
-r => Remove directories and there contents recursively.
-f => Ignore nonexistent files and arguments, never prompt
for more info run
rm --help