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

Re: git pull w/o checkout?

From
Jakub Narebski <jnareb@gmail.com>
Date
Jun 22, 2006, 13:32 UTC
Message-ID
<e7e65f$dhf$1@sea.gmane.org>
In-Reply-To
<A4C01915-3337-460C-BE19-7AC17249BE50@kernel.crashing.org>
Kumar Gala wrote:
Show 12 quoted lines
> 
> On Jun 22, 2006, at 8:13 AM, Jeff King wrote:
> 
>> On Thu, Jun 22, 2006 at 08:10:10AM -0500, Kumar Gala wrote:
>>
>>>> git-fetch?
>>> Its the first half, still need to resolve FETCH_HEAD, HEAD, etc..
>>
>> Can you elaborate on what you're trying to accomplish?
> 
> A local mirror of a git tree.  I can do the clone easy enough, its  
> trying to figure out the updates after the fact that is the issue.
Assuming typical configuration, with the following in remotes/origin
---[ <path-to-repo>/.git/remotes/origin ]----
URL: git://git.kernel.org/pub/scm/git/git.git
Pull: refs/heads/master:refs/heads/origin
Pull:+refs/heads/pu:refs/heads/pu
Pull: refs/heads/man:refs/heads/man
Pull: refs/heads/html:refs/heads/html
Pull: refs/heads/next:refs/heads/next
Pull: refs/heads/todo:refs/heads/todo
Pull: refs/heads/maint:refs/heads/maint
---------------------------------------------
to update your repository, do:

$ git checkout master $ git fetch origin

Any branch except listed ot fhose fetched to will do, or even any command that leaves HEAD different than one of the branches fetched to. Everything is updated. Then you can do the second part of pull, using

$ git checkout master $ git pull . master

-- 
Jakub Narebski
Warsaw, Poland
ShadeHawk on #git
Previous: Kumar GalaNext: Matthias Kestenholz
Message 6 of 12 in “git pull w/o checkout?”
  1. Kumar GalaJun 22, 2006
  2. Jeff KingJun 22, 2006
  3. Kumar GalaJun 22, 2006
  4. Jeff KingJun 22, 2006
  5. Kumar GalaJun 22, 2006
  6. Jakub NarebskiJun 22, 2006
  7. Matthias KestenholzJun 22, 2006
  8. Kumar GalaJun 22, 2006
  9. Jeff KingJun 22, 2006
  10. Kumar GalaJun 22, 2006
  11. Jeff KingJun 22, 2006
  12. Mathieu Chouquet-StringerJun 22, 2006

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.