Clone a remote repository, and checkout the branch pointed to by the remote HEAD.
the remote repository to clone
local directory to clone to
configuration options for the clone. If NULL, the function works as though GIT_OPTIONS_INIT were passed.
0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)