中文 English

Error deleting remote branch in git: remote ref does not exist

Published: 2021-08-27

Problem Description

When trying to delete a remote branch in the view, it displays: remote ref does not exist

Solution

The solution is to first clear the local cache of the remote branch: git fetch -p origin As you can see, the remote branch we were trying to delete has actually already been deleted.

References

https://stackoverflow.com/questions/32147093/git-delete-remotes-remote-refs-do-not-exist https://blog.csdn.net/Enjolras_fuu/article/details/95052803