Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
JoernBerkefeld opened this issue Apr 25, 2023 · 1 comment · Fixed by #1261
Closed

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

JoernBerkefeld opened this issue Apr 25, 2023 · 1 comment · Fixed by #1261
Assignees
Labels
c/INIT COMPONENT enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Milestone

Comments

@JoernBerkefeld
Copy link
Contributor

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 JoernBerkefeld added enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story" c/INIT COMPONENT labels Apr 25, 2023
@JoernBerkefeld JoernBerkefeld added this to the 5.2.0 milestone Apr 25, 2023
@JoernBerkefeld JoernBerkefeld modified the milestones: 5.2.0, 5.3.0 Jun 29, 2023
@JoernBerkefeld JoernBerkefeld modified the milestones: 5.3.0, 5.4.0 Aug 16, 2023
@JoernBerkefeld JoernBerkefeld changed the title [FEATURE] allow selecting git default branch as part of mcdev init [FEATURE] change git default branch to "main" as part of mcdev init Apr 5, 2024
@JoernBerkefeld JoernBerkefeld modified the milestones: 6.2.0, 6.1.0 Apr 5, 2024
@JoernBerkefeld JoernBerkefeld self-assigned this Apr 15, 2024
Copy link

Closed by #1261.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/INIT COMPONENT enhancement New feature or request; requires increasing the minor version of mcdev. Jira issue-type "Story"
Projects
None yet
1 participant