Updates files in the index and working tree to match the content of the tree pointed at by the treeish.
a commit, tag or tree which content will be used to update the working directory
0 on success, GIT_ERROR otherwise (use giterr_last for information about the error)