sfmc-devtools icon indicating copy to clipboard operation
sfmc-devtools copied to clipboard

[FEATURE] change git default branch to "main" as part of mcdev init

Open JoernBerkefeld opened this issue 1 year ago • 0 comments

github has moved away from using "master" as default branch for new projects due to the ongoing social discussion some time ago now. Meanwhile, the git project has not and is still defaulting to "master".

git init allows setting the default branch name and we can utilize to switch to the new github default of "main", as well as offer the user to change that optionally.

How? https://git-scm.com/docs/git-init#Documentation/git-init.txt--bltbranch-namegt

-b <branch-name>
--initial-branch=<branch-name>

Use the specified name for the initial branch in the newly created repository. If not specified, fall back to the default name (currently master, but this is subject to change in the future; the name can be customized via the init.defaultBranch configuration variable).

JoernBerkefeld avatar Apr 25 '23 14:04 JoernBerkefeld