diff --git a/gitcommands.go b/gitcommands.go index 4e6b043ed..774a821f1 100644 --- a/gitcommands.go +++ b/gitcommands.go @@ -541,6 +541,9 @@ func getGitBranches() []Branch { return []Branch{constructBranch("", gitCurrentBranchName(), 0)} } branches := getBranches() + if len(branches) == 0 { + branches = append(branches, constructBranch("", gitCurrentBranchName(), 0)) + } branches = getAndMergeFetchedBranches(branches) return branches }