I have a relatively short Gist that libgit2 should use to emulate the functionality of the git pull command. Unfortunately, it does not quite work.
In short, snippet:
According to git_remote_stats() , objects are actually retrieved. But the working directory does not change to reflect the latest commit. I tried to add:
git_checkout_head(repo, NULL);
... but it didnโt matter.
Input:
git checkout master
... the terminal displays the following output:
Already on 'master'
Your branch is behind 'origin / master' by 1 commit, and can be fast-forwarded.
How to fast forward?
source share