How to make similar on git checkout hash via libgit2? I was trying as below:
git_checkout_options opts;
opts.checkout_strategy = GIT_CHECKOUT_FORCE | GIT_CHECKOUT_REMOVE_UNTRACKED;
opts.paths.strings = "*";
opts.paths.count = 1;
...
git_checkout_tree(repo, (const git_object *) commit, &opts);
...
It has no effect. Files in repo stay in final state.