I tried
git push origin --delete remotes/origin/featgmodel
error: unable to delete 'remotes/origin/featgmodel': remote ref does not exist
But git branch -a show that it exists
* main
remotes/origin/HEAD -> origin/main
remotes/origin/featgmodel
if I try
git push -d remotes/origin/featgmodel
got
fatal: --delete doesn't make sense without any refs
How to delete remote branch?
The expected syntax is git push --delete origin featgmodel
See doc for git push
git push [...] [-d | --delete] [...] [<repository> [<refspec>…]]
remotes/origin/featgmodel is where your remote-tracking branch is stored, not the name of the remote branch.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With