From 5cc19d6b9d45dd82fc039917df4cf3d3a7fa050a Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Fri, 1 Dec 2023 13:34:34 +0100 Subject: [PATCH] chore: change default scaffolding branch to main --- ignite/pkg/xgit/xgit.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ignite/pkg/xgit/xgit.go b/ignite/pkg/xgit/xgit.go index 919889c98e..88ef52b108 100644 --- a/ignite/pkg/xgit/xgit.go +++ b/ignite/pkg/xgit/xgit.go @@ -33,7 +33,12 @@ func InitAndCommit(path string) error { return fmt.Errorf("open git repo %s: %w", path, err) } // not a git repo, creates a new one - repo, err = git.PlainInit(path, false) + repo, err = git.PlainInitWithOptions(path, &git.PlainInitOptions{ + InitOptions: git.InitOptions{ + DefaultBranch: plumbing.Main, + }, + Bare: false, + }) if err != nil { return fmt.Errorf("init git repo %s: %w", path, err) }