git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git branching & pulling

From
Junio C Hamano <junkio@cox.net>
Date
May 19, 2007, 06:05 UTC
Message-ID
<7vzm41xsa2.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<7v8xblz71o.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> writes:
Show 19 quoted lines
> "Wink Saville" <wink@saville.com> writes:
>
>> 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.

Previous: Junio C HamanoNext: Steven Grimm
Message 4 of 12 in “Git branching & pulling”
  1. Wink SavilleMay 19, 2007
  2. J. Bruce FieldsMay 19, 2007
  3. Junio C HamanoMay 19, 2007
  4. Junio C HamanoMay 19, 2007
  5. Steven GrimmMay 19, 2007
  6. Junio C HamanoMay 19, 2007
  7. Wink SavilleMay 19, 2007
  8. Josef WeidendorferMay 20, 2007
  9. Wink SavilleMay 23, 2007
  10. Junio C HamanoMay 23, 2007
  11. Document branch.autosetupmerge.Paolo Bonzini, May 23, 2007
  12. Josef WeidendorferMay 23, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.