Skip to content

Commit

Permalink
fix: master to main
Browse files Browse the repository at this point in the history
  • Loading branch information
SudoSurya committed Nov 8, 2023
1 parent f29bc17 commit 0f1e925
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cmd/program/program.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ func (p *Project) CreateMainFile() error {
cobra.CheckErr(err)
return err
}
// rename master to main
err = utils.ExecuteCmd("git", []string{"branch", "-move", "main"}, projectPath)
if err != nil {
log.Printf("Error renaming master branch to main: %v", err)
cobra.CheckErr(err)
return err
}
// Create gitignore
gitignoreFile, err := os.Create(fmt.Sprintf("%s/.gitignore", projectPath))
if err != nil {
Expand Down

0 comments on commit 0f1e925

Please sign in to comment.