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

any way to "re-sync" a bare repository against another bare repository?

From
CFChris Friesen <chris.friesen@genband.com>
Date
Sep 22, 2011, 17:22 UTC
Message-ID
<4E7B6EDD.1040106@genband.com>

Suppose I have a parent bare repository. I do a "git clone --bare" to create a child repository, and then clone the child to create a grandchild repository.

If changes get pushed into the parent repository, is there any way to cause the child to be updated?

Just a "git fetch <parent>" doesn't seem to help. If I set up parent as a remote branch I can fetch it, but then it shows all the branches as "parent/<branch>" rather than updating the child.

I just tried a "git clone --mirror" to create the child and it seems to allow me to pick up changes in the parent via "git fetch". Is that the proper way to handle this?

Thanks, Chris

-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com
Next: Michael Witten
Message 1 of 3 in “any way to "re-sync" a bare repository against another bare repository?”
  1. Chris FriesenSep 22, 2011
  2. Michael WittenSep 22, 2011
  3. Chris FriesenSep 22, 2011

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.