【发布时间】:2015-09-25 21:14:49
【问题描述】:
libgit2sharp 0.21.0.176 Windows Server 2008 上的 C#
我需要获取对特定分支的引用。
在我的 Windows 机器上,我从 GitHub 上的远程源重新 git clone 本地存储库。
接下来我执行libgit2sharp 代码:
var localRepo = new Repository({local-path},RepositoryOptions);
var remote = localRepo.Network.Remotes.Add("origin", {remote-repo-uri);
localRepo.Network.Fetch(remote, FetchOptions, Signature, "performing fetch");
var branch = localRepo.Branches[{branch-name}];
但该分支不存在于集合中,即使它存在于 GitHub 上的远程源上。
【问题讨论】:
标签: git git-branch git-clone libgit2sharp repo