I'm trying to get used to libgit2 and so am making simple git app. I know git rm --cached <filepath>
is removing the file from index (eg git_index_remove_bypath(idx, path)
). Now am looking for git reset <filepath>
Does libgit2 have an example or some documentation on how to reset file to previous state aka unstage? The best explanation I found is this one but I really didn't get what he meant.
Any pointer or even example is appreciated