repository to check out (must be non-bare)
a commit, tag or tree which content will be used to update the working directory (or null to use HEAD)
specifies checkout options (may be null)
0 on success, non-zero return value from notify_cb, or error code < 0 (use git_error_last for error details)
Updates files in the index and working tree to match the content of the tree pointed at by the treeish.