1

The git branch -a command gives me following output:

master
stable
remotes/origin/master
remotes/origin/restoring_entered_information_from_post
remotes/origin/stable

but there is no such a branch restoring_entered_information_from_post on Github, I have never created it locally, and on attempt to delete it with git push origin :restoring_entered_information_from_post it responds:

error: unable to push to unqualified destination: restoring_entered_information_from_post
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to 'git@github.com:MyCompany/mywebsite.git'
Paul
  • 25,812
  • 38
  • 124
  • 247

1 Answers1

5

Most likely the branch did exist sometimes in past and was deleted on Github. Git by default does not remove these stale branches. To delete non existing remote branches, you can use:

git remote prune origin

You might want to first run it in dry-run mode to see what it will delete:

git remote prune -n origin
Michal Čihař
  • 9,799
  • 6
  • 49
  • 87