Do not try to run a git command when it's obvious this is not a git repository.
Merge pull request #3006 from amitapl/dev2

Do not try to run a git command when it's obvious this is not a git repo...