Git.
rm -r one-of-the-directories
Removes local.
rm rm -r --cached <directory>// keep local
commit -m "Remove build directory"
Push origin master.
Also add the path to the .gitignore file.
Stage.
add -u