从手册页git branch
:
删除一个分支。如果没有使用 --track 或 --set-upstream 设置上游,则该分支必须完全合并到其上游分支中,或者在 HEAD 中。
$ git branch -d skin
warning: deleting branch 'skin' that has been merged to
'refs/remotes/origin/skin', but not yet merged to HEAD.
Deleted branch skin (was 1f97b5b).
$ git remote -v
origin git@github.com:me/Banana.git (fetch)
origin git@github.com:me/Banana.git (push)
upstream git@github.com:others/Banana.git (fetch)
upstream git@github.com:others/Banana.git (push)
皮肤分支实际上已(本地)删除,但我试图了解警告消息的含义。请注意,正如预期的那样,皮肤分支在origin和upstream仍然可用。