如何从 Git 删除无效的远程分支引用?

$ git branch -a
* master
  remotes/origin/master
  remotes/public/master
$ git branch -d remotes/public/master
error: branch 'remotes/public/master' not found.
$ git remote show 
origin
$ git push public :master
fatal: 'public' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

答案