When you run git branch -r why the blazes does it list origin/HEAD? For example, there\'s a remote repo on GitHub, say, with two branches: master a
I was under the impression that dedicated remote repos (like GitHub where no one will ssh in and work on that code, but only pull or push, etc) didn't and shouldn't have a HEAD because there was, basically, no working copy. Not so?
I had the exact same impression like you said.
And I even can not delete that origin/HEAD remote-tracking branch cloned from github by doing
git branch -d -r origin/HEAD
This had no effect.
Can some one tell me how I can delete that origin/HEAD remote-tracking branch?
Though I did not found why there is a origin/HEAD created when clone from github, I find a way to delete it.
The new version of git provide
git remote set-head -d
to delete the useless HEAD pointer of remote-tracking branch.
And we can also change the dumb default name 'origin' to whatever we want by using
git remote rename origin
Hope this can help. :)