When deleting remote git branch “error: unable to push to unqualified destination”

后端 未结 9 1926
南旧
南旧 2020-12-12 10:42

I\'m trying to delete a remote git branch with

git push origin :my_remote_branch

and getting:

error: unable to push to unq         


        
9条回答
  •  情书的邮戳
    2020-12-12 11:33

    The fact that refs/remotes/origin/my_remote_branch exists in your local repository does not imply refs/heads/my_remote_branch exists in the origin remote repository.

    Do git fetch -p origin to make refs/remotes/origin/my_remote_branch go away if it's already deleted in origin. The -p option tells fetch to delete any tracking branches that no longer exist in the corresponding remotes; by default they are kept around.

提交回复
热议问题