diff --git a/src/Git/Branch.cs b/src/Git/Branch.cs index 36e16af3..fd1030c0 100644 --- a/src/Git/Branch.cs +++ b/src/Git/Branch.cs @@ -106,7 +106,11 @@ namespace SourceGit.Git { branch.IsLocal = true; } else if (refname.StartsWith(remotePrefix, StringComparison.Ordinal)) { var name = refname.Substring(remotePrefix.Length); - branch.Remote = name.Substring(0, name.IndexOf('/')); + if (name.Contains("/")) { + branch.Remote = name.Substring(0, name.IndexOf('/')); + } else { + branch.Remote = name; + } branch.Name = name; branch.IsLocal = false; remoteBranches.Add(refname);