git中奇怪的远程分支

git中奇怪的远程分支,git,remote-branch,Git,Remote Branch,git分支-a命令提供以下输出: master stable remotes/origin/master remotes/origin/restoring_entered_information_from_post remotes/origin/stable 但是在Github上没有这样一个分支restoring\u entered\u information\u from\u post,我从来没有在本地创建过它,在尝试用git push origin删除它时:restoring\u ente

git分支-a
命令提供以下输出:

master
stable
remotes/origin/master
remotes/origin/restoring_entered_information_from_post
remotes/origin/stable
但是在Github上没有这样一个分支
restoring\u entered\u information\u from\u post
,我从来没有在本地创建过它,在尝试用
git push origin删除它时:restoring\u entered\u information\u from\u post
它响应:

error: unable to push to unqualified destination: restoring_entered_information_from_post
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@github.com:MyCompany/mywebsite.git'

最有可能的是,该分支在过去确实存在,并在Github上被删除。默认情况下,Git不会删除这些过时的分支。要删除不存在的远程分支,可以使用:

git remote prune origin
您可能希望首先在干运行模式下运行它,以查看它将删除的内容:

git remote prune -n origin

最有可能的是,该分支在过去确实存在,并在Github上被删除。默认情况下,Git不会删除这些过时的分支。要删除不存在的远程分支,可以使用:

git remote prune origin
您可能希望首先在干运行模式下运行它,以查看它将删除的内容:

git remote prune -n origin