Updates files in the working tree to match the content of the index.
repository into which to check out (must be non-bare)
index to be checked out (or NULL to use repository index)
specifies checkout options (may be NULL)
0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)