Skip to content

Commit

Permalink
chore: change default scaffolding branch to main (#3792)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Dec 1, 2023
1 parent c7cc3a5 commit 4001371
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ignite/pkg/xgit/xgit.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 4001371

Please sign in to comment.