I have a git repo with two remote.
origin/master cm/master
| |
| |
sfcc--------------cm/sfcc-18
|
|
feature
The above is the basic structure of my repo. Branch sfcc is pulled from another branch sfcc from cm.
Both the branches sfcc and feature are also pushed to the remote origin.
Branch sfcc is not yet merged to the origin/master.
Now I am on the local branch feature. I have not yet done any changes other than creating these branches. I try to switch to origin/sfcc which puts me in a detached state.
HEAD is now at 9d4f1707 Merge branch 'sfcc-18' of https://github.com/bla-bla-cm into sfcc.
Again when I try to checkout origin/migration I get the same message.
On git status
i get working tree clean and nothing to commit.
Why do I get into this situation even when nothing was changed?
In case something has changed on cm/sfcc-18, I do not want it to be tracked with respect to the cm repo changes. I have set the upstream tracking for origin/sfcc with origin/master.
I cannot checkout origin/master as well. I get the following message
Previous HEAD position was 9d4f1707 Merge branch 'sfcc-18' of https://github.com/bla-bla-cm into sfcc
HEAD is now at e71242f0 .gitignore created online with Bitbucket
origin/migration
?git checkout origin/master
git checkout
correctly. The documentation available online can also be invoked using the command line asgit help checkout
(replacecheckout
with other Git commands you need to learn about.)