Hi, List

I have two branches in the remote, say, origin/master, origin/foo.  Then
when I tried to switch to the remote foo branch, the following two
methods gave me different results:

1. git checkout foo
2. git checkout origin/foo

The first method run silently with success, but the second method
complains that I got a 'detached HEAD'.  So, I think I don't understand
the difference between 'foo' and 'origin/foo'.  Can someone give me a
hint?

Supposing I have another remote defined in .git/config that points
to another repository but also have a same name branch, say
'remote-x/foo', how do I tell git which 'foo' I want to switch to?

The similar problem also exists for 'fetch' command to me.  From the man
page, I don't find answer of how to specify which remote I am going to
fetch from. Can you help me?

Thanks in advance.


-- 
woody
I can't go back to yesterday - because I was a different person then.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to