How to “unstage” a file with Objective-Git (libgit2)?
问题 I am writing an app that allows performing basic git operations using Objective-Git, but I am having trouble figuring out how to "unstage" a file. More specifically, I have a file with changes that have previously been added to the current GTIndex and I now want to discard those changes (without losing the file's current state on disk). Here is a rough outline of the relevant logic my program currently follows when toggling the "staged" state of a file: - Fetch current GTIndex using