Re: Git branching & pulling

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: Git branching & pulling

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:11

Junio C Hamano [off-list ref] writes:
"Wink Saville" [off-list ref] writes:
quoted
Could someone give me some insight or point me at a url or doc
that could shed some light on what is happening and why git-pull
doesn't work on kvm.git.
DEFAULT BEHAVIOUR section of

    http://www.kernel.org/pub/software/scm/git/docs/git-pull.html 

would be the place to start.  Recent git-clone (post 1.5.0, I think)
prepares the following configuration variables for you by default:

        remote.origin.url
        remote.origin.fetch
	branch.master.remote
        branch.master.merge

but repositories created by older git-clone didn't.
	/me says "oops I did not finish the sentence".

but repositories created by older git-clone didn't get these
configuration variables set.  If you set them appropriately,
taking example of your other repository (and probably you would
also want to remove .git/remotes/origin while you are at it),
you can omit saying which branch to pull from where.

I personally never understood why people would just want to say
"git pull" without saying anything else, but what described in
the DEFAULT BEHAVIOUR section is how it works.

Re: Git branching & pulling

From: Steven Grimm <hidden>
Date: 2016-06-15 22:43:11

Junio C Hamano wrote:
I personally never understood why people would just want to say
"git pull" without saying anything else, but what described in
the DEFAULT BEHAVIOUR section is how it works.
  
I do that all the time, e.g. when I'm syncing the satellite repo on my 
laptop with the mothership repo in my account on my company's server. 
The satellite only ever talks to the mothership and I am always 
interested in pulling down all the changes I've committed to the 
mothership during the day. So there's really no need to specify 
anything; I always want to keep the two fully in sync, and there's never 
any question about where I'm pulling from.

I do a plain "git pull" in my clone of git.git too. I want all the 
latest updates and I'm only ever fetching them from the official git repo.

I can certainly imagine that if I were an integrator in charge of a 
master repo, I'd always want to explicitly pull from particular places.

-Steve
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help