I'm new to libgit2sharp. Because of lack of documentation I was not able to find the solution. I hope that somebody can help me out.
What I want to do is to periodically check and get incoming changes (commits).
Lets say that I initially clone the remote repository by using Repository.Clone with CloneOptions by specifying CredentialsProvider.
After that I want to periodically check for incoming changes, to find out if local repository is behind the remote repository, and if yes to find out which commits are new and to get them.
I tried to check if local branch is behind of remote branch, by I always get BehindBy 0
`using (var repository = new Repository(workDir))
{
if (branch.TrackingDetails.BehindBy > 0)
{
Hi folks,
I'm new to libgit2sharp. Because of lack of documentation I was not able to find the solution. I hope that somebody can help me out.
What I want to do is to periodically check and get incoming changes (commits).
Lets say that I initially clone the remote repository by using Repository.Clone with CloneOptions by specifying CredentialsProvider. After that I want to periodically check for incoming changes, to find out if local repository is behind the remote repository, and if yes to find out which commits are new and to get them.
I tried to check if local branch is behind of remote branch, by I always get BehindBy 0 `using (var repository = new Repository(workDir)) { if (branch.TrackingDetails.BehindBy > 0) {
} }`
How can I do this?
Thank you and best regards, Nole