How to Change the Default Branch with Github

Paul Xiong
Aug 11, 2022

--

Go to github, setting of a repo, change the branch’s default name, as following :

then:

# change the default branch to master from master1
$ git branch -m main master
$ git fetch origin
$ git push -u origin/master1 master
# delete local and remote branch
$ git branch -dr origin/master1

--

--

Paul Xiong

Coding, implementing, optimizing ML annotation with self-supervised learning, TLDR: doctor’s labeling is the 1st priority for our Cervical AI project.