/ tech-note

How to untrack a directory in Git?

The process is pretty simple:

git rm -r --cached directory_to_untrack

Note that I was forced to untrack the directory as it had a .git/ within it and thus was considered a submodule. So in my case I first deleted the .git/ before untracking the directory.

Source: http://stackoverflow.com/a/30360954/2360798