diff --git a/modules/context/context.go b/modules/context/context.go index e07ff9c..bfdaf64 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -164,6 +164,11 @@ func contextFromLocalRepo(repoPath, remoteValue string) (*git.TeaRepo, *config.L remoteValue = remote } if len(gitConfig.Remotes) > 1 { + // prefer origin if there is multiple remotes + _, ok := gitConfig.Remotes["origin"] + if ok { + remoteValue = "origin" + } // if master branch is present, use it as the default remote mainBranches := []string{"main", "master", "trunk"} for _, b := range mainBranches {