All of lore.kernel.org
 help / color / mirror / Atom feed
* How to specify remote branch correctly
@ 2012-12-17  2:30 Woody Wu
  2012-12-17  4:27 ` Andrew Ardill
  0 siblings, 1 reply; 11+ messages in thread
From: Woody Wu @ 2012-12-17  2:30 UTC (permalink / raw)
  To: git

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.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-12-17  7:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17  2:30 How to specify remote branch correctly Woody Wu
2012-12-17  4:27 ` Andrew Ardill
2012-12-17  5:06   ` Woody Wu
2012-12-17  5:13     ` Andrew Ardill
2012-12-17  5:30       ` Tomas Carnecky
2012-12-17  5:52         ` Andrew Ardill
2012-12-17  6:44           ` Chris Rorvick
2012-12-17  7:02         ` Woody Wu
2012-12-17  7:21           ` Tomas Carnecky
2012-12-17  7:41             ` Woody Wu
2012-12-17  6:48       ` Woody Wu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.