How to Change the Default Branch with Github

# 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

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Paul Xiong

Paul Xiong

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