在询问之前,该分支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)
Run Code Online (Sandbox Code Playgroud)
所以我使用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'
Run Code Online (Sandbox Code Playgroud)
远程分支refs/remotes/origin/feature/US12376/patchFix已删除.
本地git存储库仍然有引用refs/remotes/origin/feature/US12376/patchFix,即使它已被远程删除.
要删除这些引用,您可以运行
git remote prune origin
Run Code Online (Sandbox Code Playgroud)