When deleting remote git branch "error: unable to push to unqualified destination"
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.
Found question cleaning up old remote git branches and this did the trick
git branch -r -d origin/my_remote_branch
I ran across this when trying to delete a remote branch that had already been deleted. All that was needed was a prune:
git remote prune origin