Paul Verest
Paul Verest

Reputation: 63972

GitHub/git - how to make only one branch (gp-pages) and delete other branches

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.

Upvotes: 0

Views: 312

Answers (1)

user456814
user456814

Reputation:

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

enter image description here

Upvotes: 1

Related Questions