rm a.out
delete "*~" by the following
find . -name "*~" -exec git rm --cached {} \;
delete a.out.dSYM
find . -name "a.out.dSYM" -exec git rm -r --cached  {} \;
rm DS_STORE