Clone into a repository
After creating the repository and remote and configuring them for paths and callbacks respectively, you can call this function to perform the clone operation and optionally checkout files.
the branch to checkout after the clone, pass NULL for the remote's default branch
0 on success or an error code