0

Below is the branch structure, both local and remote:

$ alias graph="git log --all --decorate --graph --oneline"
$ graph
* 0d41ab3 (origin/module-4-Unit-Integ-using-Docker, module-4-Unit-Integ-using-Docker) new version
* b43ea38 new version
* a2fc98c new version
* b333774 new version
* 3e1640b new version
* 643984c new version
* 91122f1 (HEAD -> module-3, origin/module-3, origin/master) new version
* f7de930 new version
* 8a1eba3 new version
* a6c5f5d new version
* b910339 new version

To strictly follow naming conventions, I would like to delete master branch(remote), and followed this procedure.

Doesn't help.

How to delete master branch? remote

overexchange
  • 15,768
  • 30
  • 152
  • 347

1 Answers1

0

That is because github is looking at the master branch to provide the web content when you browse that repository. So we first have to make github look at our placeholder branch instead, then delete master.

First push up the placeholder branch:

git checkout placeholder # if not on placeholder already
git push origin placeholder

Then:

git push origin :master

As you'll find pointed in the article linked below, you will need to instruct the github not to monitor your master branch.

Details are in this link

AElMehdi
  • 572
  • 4
  • 12
  • This answer is missing at least one step. After making sure you have a branch on github that you want to be considered the "current" or "main" one, at least for the sake of github, you need to *tell* that to github. This step was outlined in the article you linked to, but you glossed over it in your answer. – Lasse V. Karlsen Oct 16 '19 at 14:10
  • You just said it, this is mentioned in the article. The answer was short intentionally with the idea of editing it later. I also added a comment linking a more elaborate answer. – AElMehdi Oct 16 '19 at 14:18