Check for git repository before cloning