I have a repository on my machine ins /opt/git/myrepo.git
Then I have two working directories:
/var/www/mysite.com /var/www/test.mysite.com
Both are cloned from /opt/git/myrepo.git
In test.mysite.com I created a new branch, called myfirstbranch and I pushed it to the repo with:
git push origin myfirstbranch
Then if I do git branch -a I see this:
* master
myfirstbranch
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/myfirstbranch
Now if I go over to mysite.com and do git fetch then git branch -a, this is what I see:
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/myfirstbranch
So that's fine. But then if I do:
git push origin :myfirstbranch
From mysite.com and then go over to test.mysite.com and do a git fetch, then git branch -a I still see:
* master
myfirstbranch
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/myfirstbranch
Why does it still think remotes/origin/myfirstbranch still exists? When I do git branch -a in mysite.com it doesn't show remotes/origin/myfirstbranch
Why the difference?