updated logic to check for git repo