سؤال

In other source code control, this operation is called revert or undo.

In Git, I can use

"git checkout file_paths"

to obtain similar functionality.

But in Libgit2sharp, I'm not able to find similar functionality, can anyone help me?

هل كانت مفيدة؟

المحلول

@jamill had just made available this feature a few days ago:

repo.CheckoutPaths() will refresh the content of the working directory to match the version of files from a specific tree-ish.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top