我需要合并两个分支 -second
进入first
然后摆脱second
. 这是我所做的:
git clone
d 获得新副本的项目git checkout --track origin/second
,进行了一些更改,并提交了git checkout --track origin/first
,进行了一些更改,并提交了git merge second
(git说“递归合并”)git branch -d second
然后 git 说:
$ git branch -d second
warning: not deleting branch 'second' that is not yet merged to
'refs/remotes/origin/second', even though it is merged to HEAD.
error: The branch 'second' is not fully merged.
If you are sure you want to delete it, run 'git branch -D second'.
为什么会这样?我以前从未在合并后收到此消息。合并工作得很好,没有冲突。如何安全地删除second
分支?