New repositories created by Copilot use `master` instead of `main`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 64/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- git
- Ambito
- desktop, developer-experience
Direzione di ricerca
Start by reproducing the issue in the GitHub Copilot app and inspect the repository-creation flow that initializes the local Git repository. Trace how the initial branch name is selected, then verify with git branch --show-current that creation uses main or the applicable configured default branch.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Short summary
When the GitHub Copilot app creates a new repository from scratch, it initializes the repository with master as the default branch instead of main.
Affected version or release
Current GitHub Copilot desktop app as of 2026-09-18 (exact build not captured).
Installation context
GitHub Copilot desktop app on macOS, creating a new local repository through a Copilot session.
What happened?
I asked the GitHub Copilot app to create a new repository. The resulting repository used master as its initial/default branch.
GitHub-hosted repositories have defaulted to main since 2020 unless a user, organization, or enterprise explicitly configures another name. The app appears to be relying on a local git init fallback or otherwise hard-coding/allowing master, rather than using main or honoring the applicable configured default branch name.
Steps to reproduce
- Open the GitHub Copilot app.
- Start from an empty folder or ask Copilot to create a new repository.
- Allow Copilot to initialize the Git repository.
- Inspect the initial branch name with
git branch --show-current. - Observe that the branch is named
master.
Expected behavior
The initial branch should be named main, unless a different default branch name is explicitly configured for the user, organization, enterprise, or local Git environment. Ideally, repository creation should consistently honor the applicable configured default.
Additional context
GitHub's default-branch guidance states that new repositories created on GitHub use main: https://github.com/github/renaming#new-repositories-use-main-as-the-default-branch-name
Related but not duplicate reports:
- #511 describes the app assuming
masterwhen calculating changes. - #786 describes collection projects not respecting per-repository default branches.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 2.1k
- Fork
- 157
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/app
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
Issue simili
-
comp/desktop P3 type/bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
NousResearch/hermes-agent#118866 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
[Package Request]: Raven ApertaHelp-Wanted Package-Request
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
microsoft/winget-pkgs#438682 ·
-
Daemon passes --experimental-wasm-jspi unconditionally on Node >= 24; Node 26 rejects the flag Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Automattic/studio#4908 ·
-
bug popups
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100