Thread (11 messages) flat view 11 messages, 4 authors, 2016-06-15

Re: How to specify remote branch correctly

From: Woody Wu <hidden>
Date: 2016-06-15 22:55:32

On 2012-12-17, Tomas Carnecky [off-list ref] wrote:
On Mon, 17 Dec 2012 16:13:08 +1100, Andrew Ardill
[off-list ref] wrote:
quoted
On 17 December 2012 16:06, Woody Wu [off-list ref] wrote:
quoted
1. git checkout foo.  By this command, I think I am checking out
files in my local branch named foo, and after that I also switch to
the branch. Right?
Correct. Your working directory (files) switch over to whatever your
local branch 'foo' points to, and your HEAD is updated to point to
your local branch 'foo'. Unless something goes wrong/you have
conflicting files/uncommitted changes etc.
'git checkout foo' has special meaning if a local branch with that
name doesn't exist but there is a remote branch with that name. In
that case it's equivalent to: git checkout -t -b foo origin/foo.
Because that's what people usually want.
I think this is what exactly happened to me in the first time I got the
'foo'.  One new thing to me is the '-t'.  I am not sure wether the '-t'
was used or not in the background.  How do I check the 'upstream'
relationships?  Is there any file under .git recoreded that kind of
information?


-- 
woody
I can't go back to yesterday - because I was a different person then.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help