In libgit2sharp I'm doing a fetch and merge for an upstream branch, and I want to be able to abort the merge similar to:
git merge --abort
when the MergeStatus is:
LibGit2Sharp.MergeStatus.Conflicts
Is this currently possible (using v.0.20.1)? If not, does anybody know what it would require to implement something like that?
The git-merge --abort
command is shorthand for git reset --merge
, and both a git-reset --merge
and a git-reset --hard
will abort the merge and clean up the repository, differing in how they update modified files.
LibGit2Sharp does not currently offer a reset parallel to the merge option. However if you use the Repository.Reset
method with the ResetMode.Hard
option your merge will be aborted (though with git-reset --hard
semantics).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With