Updates files in the index and the working tree to match the content of the commit pointed at by HEAD.
0 on success, GIT_EUNBORNBRANCH if HEAD points to a non existing branch, non-zero value returned by notify_cb
, or other error code < 0 (use giterr_last for error details)