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

Re: Working with remotes; cloning remote references

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Oct 17, 2008, 14:44 UTC
Message-ID
<48F8A4E8.8070008@xiplink.com>
In-Reply-To
<48F83FD0.90606@drmicha.warpmail.net>
Thanks for joining the thread, Michael!
Michael J Gruber wrote:
> 
> I don't think there is a direct gittish way for transferring the remote
> config from one repo to a clone (other than copying what git submodule
> does with .gitmodules etc.).

That's my impression, too, so I'm suggesting that the clone/push/pull commands get an option to work with remotes in config.

> Would it be sufficient for you if a clone could trigger the main repo to
> update its remotes (i.e. git remote update)?

Hmmm, I'm not sure... How would the overall merge-in-changes-from-upstream process work in that case?

Say the main repo has the code for "ThingOne" merged under a top-level thing-one/ directory:

main/$ git remote add -f ThingOne git://thing/ThingOne.git main/$ git merge -s ours --no-commit ThingOne/master main/$ git read-tree --prefix=thing-one/ -i ThingOne/master main/$ git commit -m "Merged ThingOne into /thing-one/"

Then the ThingOne folks update their code, so we want to incorporate their changes into our version of their code. I think you're suggesting that we might make a clone of the main repo then trigger a "git remote update" in the clone's origin:

clone/$ make-origin-do-git-remote-update

What's not clear to me is how to proceed from here. At this point I'm hoping there's some way I could do some work in the clone to merge the changes the ThingOne folks did into our code. I'm too new to git to know if there is a way forward -- is there?

(With the subtree merge pattern I'd run "git pull -s subtree ThingOne master" in the main repo -- is there an equivalent achievable in the clone if the main has done a "git remote update"?)

Thanks,
		Marc
Previous: Michael J GruberNext: Michael J Gruber
Message 7 of 24 in “Working with remotes; cloning remote references”
  1. Marc BranchaudOct 16, 2008
  2. Peter HarrisOct 16, 2008
  3. Marc BranchaudOct 16, 2008
  4. Peter HarrisOct 16, 2008
  5. Marc BranchaudOct 16, 2008
  6. Michael J GruberOct 17, 2008
  7. Marc BranchaudOct 17, 2008
  8. Michael J GruberOct 17, 2008
  9. Marc BranchaudOct 17, 2008
  10. Michael J GruberOct 20, 2008
  11. Marc BranchaudOct 20, 2008
  12. Michael J GruberOct 21, 2008
  13. Marc BranchaudOct 21, 2008
  14. Michael J GruberOct 22, 2008
  15. Terminology question: "tracking" branchesBjörn Steinbrink, Oct 22, 2008
  16. Michael J GruberOct 23, 2008
  17. Marc BranchaudOct 27, 2008
  18. Björn SteinbrinkOct 27, 2008
  19. Johannes SchindelinOct 27, 2008
  20. Björn SteinbrinkOct 27, 2008
  21. Björn SteinbrinkOct 28, 2008
  22. Marc BranchaudOct 27, 2008
  23. Michael J GruberOct 28, 2008
  24. Marc BranchaudOct 28, 2008

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.