2

In pygit2, if I stage the adding or removing of a file, how can I unstage them like I'd do with git reset?

I need to use pygit2 to accomplish the following git actions:

git reset HEAD
git checkout .

I can checkout with

repo = pygit2.Repository(target_dir)
repo.checkout('HEAD')

but I don't know how to do the reset action.

Thanks

avck
  • 3,535
  • 3
  • 26
  • 38
pistacchio
  • 56,889
  • 107
  • 278
  • 420

0 Answers0