Fix tracking .git files and optimize status

1) Fixes a bug in not clearing up the git commit box state.
2) Optimize git status for returning the list of deleted files.
3) Track files with prefix ".git" as part of the git repo. #2013 
@devoncarew  PTAL thanks.