I am working on a customization based on a github project https://github.com/USER_A/PROJ_A.
I started by doing a clone of the original project and started my customization in a local branch MY_BRANCH. Once I am done, I wanted to push MY_BRANCH to my own repository as master branch.
- MY_BRANCH/master
- origin/HEAD -> origin/master
- origin/BR_1
- origin/BR_2
- origin/BR_3
- origin/master
- origin/BR_4
When I tried to switch over to the master branch of my own repo, I always got HEAD DETACHED.
HEAD detached at MY_BRANCH/master
Is this ok? What is the best practice to handle multiple remote repo in this scenario?
What is the git command you created MY_BRANCH with?
And what is the git command that produced the list above? My guess:
git branch -a
.Because it seems that MY_BRANCH is not a branch but a remote. And MY_BRANCH/master seems to be a remote branch, because this is exactly what happens when you check out a remote branch: detached head.
To create and check out a local version of a remote branch (it's called a remote tracking branch):
It's a very bad idea to call a remote MY_BRANCH.