I am assuming that you are asking how to remove ALL the files in the build folder or the bin folder, Rather than selecting each files separately.
You can use this command:
git rm -r -f /build\*
Make sure that you are in the parent directory of the build directory.
This command will, recursively "delete" all the files which are in the bin/ or build/ folders. By the word delete I mean that git will pretend that those files are "deleted" and those files will not be tracked. The git really marks those files to be in delete mode.
Do make sure that you have your .gitignore ready for upcoming commits.
Documentation : git rm