Using libgit2, I am able to do the equivalent of git add with git_index_add, but I am struggling to figure out how to achieve the equivalent of git rm on a file that has been deleted.
Using libgit2, I am able to do the equivalent of git add with git_index_add
Share
You do that with the
git_index_removefunction. As stage you’ll probably want 0 (assuming you’re not dealing with conflicts). It doesn’t matter whether the file exists on the filesystem or not.