我有两个远程分支:
- pending-issues-in-project
- new-issues-in-project
我试图像这样删除 pending-issues-in-project
:git push origin :pending-issues-in-project
,但是我收到了错误提示:error: unable to push to unqualified destination: pending-issues-in-project
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:forkedRepo/RepoName.git'
我认为可能是我已经删除了 pending-issues-in-project
分支,但是当我运行 git branch -a
时,在列表中仍然显示 pending-issues-in-project
分支。
当我尝试对 new-issues-in-project
进行同样的操作(尝试删除),它成功了。
我已经使用 git branch -D branchName
命令从本地服务器上删除了这两个分支。
如果错误是因为仓库中不存在该分支,则为什么会在远程分支列表中显示?
另外,是否有强制删除远程分支的方法?
感谢您的时间。
git branch -r
给你什么信息? - Sherman Lo