为什么我得到:`警告:不删除尚未合并的分支'会计'?

时间:2017-01-30 15:18:24

标签: git

我在accounting分支上并将其合并到master

*   7a34928 (HEAD -> master) Merge branch 'accounting'
|\  
| * 8d6b273 (accounting) Typo fix
| * 19f5fdc (origin/accounting) SCHEMA 19: Lock Saldo* tables when inserting new rows
| * 9261d7b Code comments; Prettify; Small optimizations
| * 0a44c1d FIX: Added required field queries

现在我要删除accounting分支,但收到错误:

git branch -d accounting 
warning: not deleting branch 'accounting' that is not yet merged to
         'refs/remotes/origin/accounting', even though it is merged to HEAD.
error: The branch 'accounting' is not fully merged.
If you are sure you want to delete it, run 'git branch -D accounting'.

为什么我收到此错误?怎么逃避它?

1 个答案:

答案 0 :(得分:2)

推送您的会计分支,否则删除远程会计分支。

在你的情况下,当你要删除分支时,1。删除远程分支,2。删除本地分支:

# You are on master here.
git push origin :accounting
git branch -d accounting