Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git使用LibGit2Sharp显示分支_Git_Libgit2sharp - Fatal编程技术网

git使用LibGit2Sharp显示分支

git使用LibGit2Sharp显示分支,git,libgit2sharp,Git,Libgit2sharp,我想列出远程存储库上的所有提交,而不在本地实际克隆远程存储库。使用git,我可以通过以下命令执行此操作: git show-branch --more=500 master 我们是否也有办法使用LibGit2Sharp实现这一点 我想列出远程存储库上的所有提交,而不在本地实际克隆远程存储库。使用git,我可以通过以下命令执行此操作: git show-branch --more=500 master 仅在本地存储库上运行。它不会从配置的远程设备检索任何提交 我们是否也有办法使用LibGit2

我想列出远程存储库上的所有提交,而不在本地实际克隆远程存储库。使用git,我可以通过以下命令执行此操作:

git show-branch --more=500 master
我们是否也有办法使用LibGit2Sharp实现这一点

我想列出远程存储库上的所有提交,而不在本地实际克隆远程存储库。使用git,我可以通过以下命令执行此操作:

git show-branch --more=500 master
仅在本地存储库上运行。它不会从配置的远程设备检索任何提交

我们是否也有办法使用LibGit2Sharp实现这一点

下面的代码应该模拟git show分支

var branch = repository.Branches["master"];

foreach (var commit in branch.Commits)
{
    Console.WriteLine("{0}: {1}", commit.Id.ToString(7), commit.MessageShort);
}

@澳博有没有向您提供过这个问题的帮助?