2

git@test-git-server:product/test-product.get2 つのブランチを含むような git URL があります。その URL に関連付けられているすべてのブランチを取得したいと考えています。

そのURLから複製されたロケーションディレクトリから情報を取得しようとしましたが、メインブランチしか表示されません。

var repo = new Repository(path);

var remotes = repo.Network.Remotes;

foreach (var remote in remotes)
{
    Debug.WriteLine("remote: {0}", remote.Name);
}

LibGit2Sharp を使用してこれを行う方法は?

4

1 に答える 1

3

Branches次のプロパティを確認する必要がありますRepository

/// <summary>
/// Lookup and enumerate branches in the repository.
/// </summary>
public BranchCollection Branches

ソース: ここの 283 行目: https://github.com/libgit2/libgit2sharp/blob/master/LibGit2Sharp/Repository.cs

于 2014-02-24T07:50:51.730 に答える