Added check for pre existing repo and git installation