# Our default branch is now \`main\`

**URL:** https://meta.discourse.org/t/our-default-branch-is-now-main/197598
**Category:** Development
**Created:** [July 19, 2021, 3:21pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598 "2021-07-19T15:21:40Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 19, 2021, 3:21pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/1 "2021-07-19T15:21:40Z")

</div>

As of this morning, our main repo [discourse/discourse](https://github.com/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:

 ![image](https://global.discourse-cdn.com/meta/original/3X/e/5/e5625996984cf22a3f970b5f71c93a5cc8f189a4.png)

```plaintext
git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
git checkout main

```

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 19, 2021, 3:21pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/2 "2021-07-19T15:21:53Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 19, 2021, 3:59pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/3 "2021-07-19T15:59:47Z")

</div>

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…

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 19, 2021, 4:00pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/4 "2021-07-19T16:00:43Z")

</div>

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

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 19, 2021, 4:10pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/5 "2021-07-19T16:10:29Z")

</div>

> [@eviltrout](#):
>
> I believe every plug-in and theme component has already been updated.

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.

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 19, 2021, 8:03pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/6 "2021-07-19T20:03:59Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [July 20, 2021, 6:19pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/7 "2021-07-20T18:19:27Z")

</div>

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

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [July 20, 2021, 7:09pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/9 "2021-07-20T19:09:43Z")

</div>

What commands do you type to update via command line?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [July 20, 2021, 7:10pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/10 "2021-07-20T19:10:03Z")

</div>

> [@Richie](#):
>
> Excuse my ignorance here, but will this change the way I usually update my Discourse via command line?

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

---

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [July 20, 2021, 7:49pm UTC](https://meta.discourse.org/t/our-default-branch-is-now-main/197598/11 "2021-07-20T19:49:40Z")

</div>

> [@eviltrout](#):
>
> What commands do you type to update via command line?

I use:

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

```

> [@pfaffman](#):
>
> No. It matters only if you’re a developer and know what a git branch is.

Thanks 😊
