Updates some entries in the index from the target commit tree.
The scope of the updated entries is determined by the paths
being passed in the pathspec
parameters.
Passing a NULL target
will result in removing
entries in the index matching the provided pathspecs.
The committish which content will be used to reset the content of the index.
0 on success or an error code < 0