How to untrack files in git

When I first started tracking my Xcode projects in git, I didn't set up my .git/info/exclude file and ended up tracking a lot of the files in the build/ directory (eg, object files, executables, .pbxuser, etc).

I later modified the exclude file to handle this issue, but since I had already started tracking a lot of the files in the build folder (files that changed with every compile regardless of actual source changes), it didn't work.

To stop tracking these newly untracked files, run this (or let me know if you find something better or more appropriate. This is working fine so far.):

git rm -r --cached build

This removes tracking on all files within the build directory.