Skip to content

Create new repositories on the main branch - #1286

Merged
clementbiron merged 3 commits into
mainfrom
create-repositories-on-main-branch-review
Oct 7, 2026
Merged

clementbiron merged 3 commits into
mainfrom
create-repositories-on-main-branch-review

Conversation

@clementbiron

Copy link
Copy Markdown
Member

The versions, snapshots and tracking-results repositories created by the engine got the default branch of the Git configuration of the server, master on most servers, whereas the deployment clones them on main and the reporter links to blob/main. Once published, such a repository pushed a master branch next to the main branch that GitHub creates with the README.

New repositories are now created with git init --initial-branch=main, which requires Git 2.28, available on all the operating systems the engine is guaranteed to work on. Git ignores this option for existing repositories, which keep their branch, as renaming it would diverge from their remote; the changelog explains how to move one to main.

@clementbiron
clementbiron requested a review from Ndpnt October 7, 2026 09:41

@Ndpnt Ndpnt 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.

I agree with the change. I would frame the motivation differently though: the point is less that the deployment expects main (it could be made configurable) than that main is now the default everywhere the engine publishes. GitHub and GitLab create main by default, the deployment already assume it, and Git's own roadmap states that Git 3.0 will create new repositories on main to match the forges. The engine was the last piece whose result still depended on the local Git configuration of the server. Framed this way, a constant rather than a configuration option is the obvious choice.

Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
@clementbiron
clementbiron force-pushed the create-repositories-on-main-branch-review branch from c859c27 to 61d8051 Compare October 7, 2026 11:34
@clementbiron
clementbiron merged commit 5e479ff into main Oct 7, 2026
8 checks passed
@clementbiron
clementbiron deleted the create-repositories-on-main-branch-review branch October 7, 2026 12:06
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.

2 participants