dwyl / gitea-server

🍵 Step-by-step instructions for deploying Gitea on Fly.io
https://gitea-server.fly.dev/
GNU General Public License v2.0
9 stars 3 forks source link

Configure Gitea for usin `main` instead of `master` #9

Open SimonLab opened 2 years ago

SimonLab commented 2 years ago

The main branch name has become the default name for the default repository branch.

nelsonic commented 2 years ago

I'm able to manually rename the default branch master > main: https://gitea-server.fly.dev/demo-org/hello-world/settings/branches image

According to https://github.com/go-gitea/gitea/issues/9542#issuecomment-569593916 image

We could just not init a repo and then do a manual init with the branch defined as main 💭

nelsonic commented 2 years ago

A bit more digging ... https://docs.gitea.io/en-us/config-cheat-sheet/#repository-repository we need to update app.ini to include the line:

DEFAULT_BRANCH: main
nelsonic commented 2 years ago

@SimonLab going to leave this with you to attempt and document. 👍

SimonLab commented 2 years ago

Thanks for all the research @nelsonic ,I'll have a try with Gitea config DEFAULT_BRANCH value