Our default branch is now `main`

As of this morning, our main repo discourse/discourse has renamed its main branch from master to main to avoid slavery references.

We’ve spent a long time slowly renaming all our branches and updating our code base to support this change. However, some things may break. Please use this topic to report any errors you encounter.

If you already have a version of discourse checked out on your computer for development you will have to rename it. Github conveniently offers the following instructions:

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
git checkout main
43 Likes

Thanks for the fix. I was wondering when this was going to happen. But now I want to know if and when you’ll be doing the rest…

5 Likes

What do you mean by the rest? I believe every plug-in and theme component has already been updated.

5 Likes

Funny. Now when I checked some others in my discourse-repos I see that you’re right! But the first one I checked was discourse_docker, and it and discourse_api (and discourse-plugin-ci, which I think I, and perhaps everyone, should delete) still have master.

Reading your announcement again, I don’t see that you explicitly say that you did it for all the plugins and theme components (I think that’s what you mean by “all our branches”, but it wasn’t clear). Oh, and the first sentence refers explicitly to discourse/discourse, which I think also lead me to believe that you mean just discourse/discourse.

8 Likes

Ah, I understand the confusion. Almost every sub project was renamed quite some time ago so this announcement was meant to say “and the core project is now done, too.”

As for those other projects, we’ll get to them soon. We actually have hundreds of repos and a handful might have been waiting for this to go through.

12 Likes

Excuse my ignorance here, but will this change the way I usually update my Discourse via command line?

1 Like

What commands do you type to update via command line?

1 Like

No. It matters only if you’re a developer and know what a git branch is.

3 Likes

I use:

cd /var/discourse
git pull
./launcher rebuild app

Thanks :blush:

2 Likes