Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 错误:分支';你的名字';未与删除的远程服务器完全合并_Git_Github - Fatal编程技术网

Git 错误:分支';你的名字';未与删除的远程服务器完全合并

Git 错误:分支';你的名字';未与删除的远程服务器完全合并,git,github,Git,Github,无法删除已合并并从GitHub中删除的本地分支 $ git branch -d startapp warning: not deleting branch 'startapp' that is not yet merged to 'refs/remotes/origin/startapp', even though it is merged to HEAD. error: The branch 'startapp' is not fully merged. If you ar

无法删除已合并并从GitHub中删除的本地分支

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

$ git branch
* master
  startapp

$ git checkout startapp
Switched to branch 'startapp'
Your branch is ahead of 'origin/startapp' by 65 commits.
  (use "git push" to publish your local commits)

$ git pull
Your configuration specifies to merge with the ref 'startapp'
from the remote, but no such ref was fetched.
分支在从GitHub合并后被删除。它也完全融入到主控中

$ git log --graph --left-right --cherry-pick --oneline master...startapp
$
$ git log --graph --left-right --oneline master...startapp
$

为什么投诉?

来自
曼吉特分行

-d, --delete
   Delete a branch. The branch must be fully merged in its upstream
   branch, or in HEAD if no upstream was set with --track or
   --set-upstream.
您的分支未完全合并到已设置的上游分支( 现在它不能这样合并,因为上游分支已经被合并了 删除)

这是一个合理的安全检查:在删除 尚未推送到其原点的分支。如果你碰巧知道的话 一切都很好,然后按照诊断中的建议:

If you are sure you want to delete it, run 'git branch -D startapp'. 

如果分支完全合并到master,只需签出到master,然后

git branch -D <your-fully-merged-branch>
git分支-D
Git有点不正确,因为您收到的消息实际上是一个警告,而不是一个错误


在您的特定情况下,当
从合并的分支中拉出时,您不会得到任何
ref
s,这是正常的。继续运行
-D
,应该没有问题。

分支在合并之前完全合并到上游主节点,并且该主节点在本地跟踪-这就足够了。