0

I have git repository with site, that is publish on GitHub pages (gh-pages branch).

Now I want to have only one branch gh-pages and delete all others (local and on server)

The answer that pops-up is How do I delete a Git branch both locally and remotely? , however when doing

git push origin --delete master

remote: error: refusing to delete the current branch: refs/heads/master To https://github.com/Nodeclipse/www.nodeclipse.com.git ! [remote rejected] master (deletion of the current branch prohibited) error: failed to push some refs to 'https://github.com/Nodeclipse/www.nodeclipse .com.git'

With Eclipse EGit I can delete in UI but it remains on server, and after pull comes back.

Community
  • 1
  • 1
Paul Verest
  • 60,022
  • 51
  • 208
  • 332

1 Answers1

1

You might need to change the default branch in your remote repo to be something other than the master branch:

enter image description here