赞
踩
今天在执行Git 删除远程指定分支,提示如下截图错误信息:
- zzg@LAPTOP-8R0KHL88 MINGW64 /e/idea_workspace/smart-medical (master)
- $ git push origin :main
- To github.com:zhouzhiwengang/SpringCloud-.git
- ! [remote rejected] main (refusing to delete the current branch: refs/heads/main)
- error: failed to push some refs to 'github.com:zhouzhiwengang/SpringCloud-.git'
-
错误原因:删除指定的分支是当前默认分支,所以无法删除。
解决办法:将当前默认分支有main 修改master.
修完完毕之后,不要忘记点击旁边的 update 按钮,update一下才能生效。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。