use git rev-parse to test if in git rep