Checks if a git repository exists on the chosen or current directory.