Skip to content

Default git init branch to main#6134

Open
orellazri wants to merge 1 commit into
basecamp:devfrom
orellazri:default-git-branch-main
Open

Default git init branch to main#6134
orellazri wants to merge 1 commit into
basecamp:devfrom
orellazri:default-git-branch-main

Conversation

@orellazri

Copy link
Copy Markdown

Change the default git branch name from master to main which is the default for new repositories pretty much everywhere.

Copilot AI review requested due to automatic review settings June 24, 2026 19:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Omarchy’s shipped git configuration to default new repositories’ initial branch to main instead of master, and adds a migration to apply the change for existing installs.

Changes:

  • Update config/git/config to set [init] defaultBranch = main.
  • Add a migration to update existing user git config from master to main.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
migrations/1780929365.sh Adds a migration intended to switch existing installs to init.defaultBranch=main.
config/git/config Changes the shipped git default branch from master to main.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread migrations/1780929365.sh Outdated
@orellazri orellazri force-pushed the default-git-branch-main branch from 57cce33 to bfddd78 Compare June 24, 2026 19:20
@chrisroundhill

Copy link
Copy Markdown

Good luck with this one:

https://x.com/dhh/status/1972765204208603631

https://world.hey.com/dhh/forcing-master-to-main-was-a-good-faith-exploit-b21ee30c

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants