git分支-d给出警告 [英] git branch -d gives warning

查看:1977
本文介绍了git分支-d给出警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


警告:正在删除分支<$ c $已经合并为
'refs / remotes / origin / old_branch',但尚未合并为 old_branch' code> HEAD 。



解决方案

警告你已将更改推送到 origin 上的分支,但它们不会合并到 master 中,所以您只在本地删除它。



它警告你不再有该分支的本地副本,但它存在于 origin



如果您想要删除远程分支,请使用 git push --delete origin old_branch


Just want to get a better understanding of the warning message after I deleted a local branch

warning: deleting branch 'old_branch' that has been merged to 'refs/remotes/origin/old_branch', but not yet merged to HEAD.

解决方案

This is just warning you that you have changes pushed to the branch on origin, but they are not merged into master, so you are only deleting it locally.

It is warning you that you no longer have a local copy of that branch, but it exists in origin

If you want to delete the remote branch as well, use git push --delete origin old_branch

这篇关于git分支-d给出警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆