I am trying to do some remedial git clean-up work on a repository that was started a while back. When I run git branch -a
I get the following output:
$ git branch -a
* master
staging
remotes/origin/master
remotes/origin/staging
remotes/pythonanywhere/master
remotes/pythonanywhere/staging
remotes/staging/staging
The remotes/staging/staging
remote does not exist anymore. It does not show up in the list when running git remote -v
.
This also seems to mean I cannot delete the remote.
get fetch -p
, git remote prune staging
also do not work.
Also the remote does not show up in the list of remotes when running git config --local -l
EDIT:
The suggested possible duplicate questions/answers did not work when trying to solve this issue. For some reason the remote was left as an orphan. See the accepted answer below for what worked.