Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

New repositories created by Copilot use `master` instead of `main`

Đang mở
#4,041 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
64/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
git

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage
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
  1. Open the GitHub Copilot app.
  2. Start from an empty folder or ask Copilot to create a new repository.
  3. Allow Copilot to initialize the Git repository.
  4. Inspect the initial branch name with git branch --show-current.
  5. 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 master when calculating changes.
  • #786 describes collection projects not respecting per-repository default branches.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
2.1k
Fork
157
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/app

Tất cả issue của github/app

Issue tương tự

Thêm issue về Desktop Dev

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.