加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

git删除远程master分支

(2018-08-03 14:07:50)
分类: Linux的学习
很多人会遇到删除不了的问题,比如下:
  fekit-extension-yo git:(dev) git push origin :master
remote: error: By default, deleting the current branch is denied, because the next
remote: error: 'git clone' won'result in any file checked out, causing confusion.
remote: error:
remote: error: You can set 'receive.denyDeleteCurrent' configuration variable to
remote: error: 'warn' or 'ignore' in the remote repository to allow deleting the
remote: error: current branch, with or without warning message.
remote: error:
remote: error: To squelch this message, you can set it to 'refuse'.
remote: error: refusing to delete the current branch: refs/heads/master
To git@gitlab.corp.qunar.com:fed/yobuilder.git
 [remote rejected] master (deletion of the current branch prohibited)
error: failed to push some refs to 'git@gitlab.corp.qunar.com:fed/yobuilder.git'   

通过客户端删除(点击右边的删除按钮即可)


如果是自己的服务器,可以登录进去,然后
platform/manifests.git$ cat HEAD 
ref: refs/heads/master
改HEAD的指向分支就可以。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有