I’ve been trying to change the working directory using libgit2sharp and so far I haven’t worked out how to do it. Checkout doesn’t appear to do it, Reset is available but ResetOptions.Hard is not. Has it not been implemented or is there a way that I’m missing?
Thanks for any help!
Currently, LibGit2Sharp implemenation of Checkout only deals with moving
HEAD. As well, Reset Hard is not implemented yet.Fortunately, the
Checkoutfeature has been added to libgit2 few weeks ago.It’s only a matter of time (and a little bit of code 🙂 ) before this feature is made available to LibGit2Sharp.
Update:
The
vNextdevelopment branch has been updated. It’s now possible to perform a Hard Reset. (e.g.repo.Reset(ResetOptions.Hard, "HEAD~3");)For more information, one can peek at the changes here.