diff --git a/pkg/commands/loading_remotes.go b/pkg/commands/loading_remotes.go index 49d4fabfe..096deb71c 100644 --- a/pkg/commands/loading_remotes.go +++ b/pkg/commands/loading_remotes.go @@ -27,7 +27,7 @@ func (c *GitCommand) GetRemotes() ([]*models.Remote, error) { for i, goGitRemote := range goGitRemotes { remoteName := goGitRemote.Config().Name - re := regexp.MustCompile(fmt.Sprintf(`%s\/([\S]+)`, remoteName)) + re := regexp.MustCompile(fmt.Sprintf(`(?m)^\s*%s\/([\S]+)`, remoteName)) matches := re.FindAllStringSubmatch(remoteBranchesStr, -1) branches := make([]*models.RemoteBranch, len(matches)) for j, match := range matches {