Skip to contentSkip to conversation

Updating branching scheme to use "main"

ANN Tom Rini 3 participants 7 messages Jul 8 – Jul 23

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

Hey all,

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

Signature · 1 line
Tom
#1 lore raw

On 7/8/26 6:19 PM, Tom Rini wrote:

Hello Tom,

Quoted 5 lines

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

It would be helpful for legacy build system integrations to keep the 'master' branch around and mark it as "protected" or some such, so it cannot be updated after certain cutoff point.

OE fetcher for example checks whether a specific commit SHA exists on a branch unless that is inhibited via 'nobranch=1'.

It was suggested that the 'master' branch can be pushed with commits up to v2026.07 release, and then stop being updated, while the 'main' branch will be updated going forward. I think this would cover all the old build system integrations without causing them too much breakage.

For example gstreamer kept the old 'master' branch around, stopped updating it, and then kept updating the 'main' branch going forward, which to me seems like the optimal compromise:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/master?ref_type=heads

author
#2 lore raw
Quoted 21 lines · Marek Vasut

On 7/8/26 6:19 PM, Tom Rini wrote:

Hello Tom,

Quoted 5 lines

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

It would be helpful for legacy build system integrations to keep the 'master' branch around and mark it as "protected" or some such, so it cannot be updated after certain cutoff point.

OE fetcher for example checks whether a specific commit SHA exists on a branch unless that is inhibited via 'nobranch=1'.

It was suggested that the 'master' branch can be pushed with commits up to v2026.07 release, and then stop being updated, while the 'main' branch will be updated going forward. I think this would cover all the old build system integrations without causing them too much breakage.

Quoted 5 lines

For example gstreamer kept the old 'master' branch around, stopped updating it, and then kept updating the 'main' branch going forward, which to me seems like the optimal compromise:

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/master?ref_type=heads

Thanks for looking in to this. It's not hard to have "master" stop at v2026.07 and be protected from pushes, etc, so I've done that now on git.u-boot-project.org.

Signature · 1 line
Tom
#3 lore raw
Quoted 26 lines · Tom Rini
Quoted 25 lines · Marek Vasut

On 7/8/26 6:19 PM, Tom Rini wrote:

Hello Tom,

Quoted 5 lines

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

It would be helpful for legacy build system integrations to keep the 'master' branch around and mark it as "protected" or some such, so it cannot be updated after certain cutoff point.

OE fetcher for example checks whether a specific commit SHA exists on a branch unless that is inhibited via 'nobranch=1'.

It was suggested that the 'master' branch can be pushed with commits up to v2026.07 release, and then stop being updated, while the 'main' branch will be updated going forward. I think this would cover all the old build system integrations without causing them too much breakage.

For example gstreamer kept the old 'master' branch around, stopped updating it, and then kept updating the 'main' branch going forward, which to me seems like the optimal compromise:

Quoted 5 lines
Quoted 1 line

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/master?ref_type=heads

Thanks for looking in to this. It's not hard to have "master" stop at v2026.07 and be protected from pushes, etc, so I've done that now on git.u-boot-project.org.

Thanks !

author
#4 lore raw
In reply to Tom Rini
Quoted 7 lines · Tom Rini

Hey all,

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

This is now in effect. The "main" branch on
https://git.u-boot-project.org/u-boot/u-boot is up to date, and the "master" branch (per Marek's suggestion) is on v2026.07. The GitHub, Gitlab.com and also source.denx.de repositories match this.

On a related note, that I'll emphasize more stand-alone, it is best to switch over to https://git.u-boot-project.org/u-boot/u-boot for all of your git-based needs.

Signature · 1 line
Tom
#5 lore raw
Quoted 10 lines · Tom Rini
Quoted 7 lines · Tom Rini

Hey all,

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

Quoted 4 lines

This is now in effect. The "main" branch on
https://git.u-boot-project.org/u-boot/u-boot is up to date, and the "master" branch (per Marek's suggestion) is on v2026.07. The GitHub, Gitlab.com and also source.denx.de repositories match this.

Tip: If, like me, you are heavily relying on tab-completion, you will now experience that

git log up<TAB>m<TAB>

no longer tab-completes to upstream/master, nor, as it now should, upstream/main, because both exist, so it only ends up showing "upstream/ma".

You can easily configure git to ignore the "master" branch on the upstream remote. First, delete the current remote-tracking branch:

  git branch --remote --delete upstream/master

Then in your repository's .git/config, make sure the remote.upstream section is something like

[remote "upstream"]
url = https://git.u-boot-project.org/u-boot/u-boot.git
fetch = +refs/heads/*:refs/remotes/upstream/* fetch = ^refs/heads/master

i.e. add the negative refspec '^refs/heads/master'. Then "git remote update", "git fetch upstream" and similar won't create that remote-tracking branch again.

(Of course, replace "upstream" by "origin" or whatever your remote name is for the upstream repository.)

Rasmus

author
#6 lore raw
Quoted 39 lines · Rasmus Villemoes
Quoted 10 lines · Tom Rini
Quoted 7 lines · Tom Rini

Hey all,

As part of migrating from source.denx.de and over to git.u-boot-project.org, I think it's time to change the branching scheme from master or next to main or next. Since we'll be changing the URLs, I don't think we need to (and I'm not sure we can automatically) have a period where both exist. Thanks!

Quoted 4 lines

This is now in effect. The "main" branch on
https://git.u-boot-project.org/u-boot/u-boot is up to date, and the "master" branch (per Marek's suggestion) is on v2026.07. The GitHub, Gitlab.com and also source.denx.de repositories match this.

Tip: If, like me, you are heavily relying on tab-completion, you will now experience that

git log up<TAB>m<TAB>

no longer tab-completes to upstream/master, nor, as it now should, upstream/main, because both exist, so it only ends up showing "upstream/ma".

You can easily configure git to ignore the "master" branch on the upstream remote. First, delete the current remote-tracking branch:

  git branch --remote --delete upstream/master

Then in your repository's .git/config, make sure the remote.upstream section is something like

[remote "upstream"]
url = https://git.u-boot-project.org/u-boot/u-boot.git
fetch = +refs/heads/*:refs/remotes/upstream/* fetch = ^refs/heads/master

Quoted 6 lines

i.e. add the negative refspec '^refs/heads/master'. Then "git remote update", "git fetch upstream" and similar won't create that remote-tracking branch again.

(Of course, replace "upstream" by "origin" or whatever your remote name is for the upstream repository.)

That's a good tip, thank you! It should probably get put in a doc somewhere for others to reference. I'll try and remember that as part of also needing to likely update some other docs.

Signature · 1 line
Tom