分支refs/remotes/origin/feature/US12376
被推送到origin
但是时间才被问到:
Your branch is based on 'origin/feature/US12376', but the upstream is gone.
(use "git branch --unset-upstream" to fixup)
所以我使用git branch --unset-upstream
(成功通过)。
提交后我尝试git push --set-upstream origin feature/US12376
,但收到错误:
error: update_ref failed for ref 'refs/remotes/origin/feature/US12376': cannot lock ref 'refs/remotes/origin/feature/US12376': 'refs/remotes/origin/feature/US12376/patchFix' exists; cannot create 'refs/remotes/origin/feature/US12376'
远程分支refs/remotes/origin/feature/US12376/patchFix
已删除。
答案 0 :(得分:5)
本地git存储库仍然引用refs/remotes/origin/feature/US12376/patchFix
,即使它已被远程删除。
要删除这些引用,您可以运行
git remote prune origin