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

Re: Question on GIT usage.

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Oct 31, 2005, 23:03 UTC
Message-ID
<Pine.LNX.4.64.0510311749080.25300@iabervon.org>
In-Reply-To
<4362C700.6020901@candelatech.com>
On Fri, 28 Oct 2005, Ben Greear wrote:
Show 7 quoted lines
> I have a kernel GIT tree to hold my developing patches...
> 
> I need to build this kernel for 4-5 different processors (c3, p2, p4, p4-smp,
> etc).
> 
> Is there any clever way to have this one git repository keep these
> other source trees in sync so that I can do incremental builds?

The following is not at all standard; AFAICT, I'm the only person who does it. But...

You can have a single repository shared between multiple working trees, by having the repository somewhere and making .git/{objects,refs,info,remotes} be symlinks to the corresponding directories in the repository. I've got a script to set this up, if you want.

The system will be unhappy if you commit to a branch that is checked out elsewhere (because the head of that branch will change out from under the checked out version), like having someone push to a repository with the branch checked out.

You need to think about this as there only being one repository that has multiple working trees, rather than having working tree/repository pairs, where the repositories are connected as an optimization; anything you do in one of the working trees will automatically affect what the others see.

This isn't official supported, but it actually works quite well, except that things that should be shared are occasionally added to the .git directory (like remotes not too long ago).

	-Daniel
*This .sig left intentionally blank*
Previous: Linus TorvaldsNext: Linus Torvalds
Message 4 of 9 in “Question on GIT usage.”
  1. Ben GreearOct 29, 2005
  2. Ryan AndersonOct 29, 2005
  3. Linus TorvaldsOct 29, 2005
  4. Daniel BarkalowOct 31, 2005
  5. Linus TorvaldsOct 31, 2005
  6. Daniel BarkalowOct 31, 2005
  7. Linus TorvaldsOct 31, 2005
  8. Daniel BarkalowOct 31, 2005
  9. Junio C HamanoNov 1, 2005

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.