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

Re: Question on multi-level git repository heiarchy.

From
BGBen Greear <greearb@candelatech.com>
Date
Oct 27, 2006, 14:05 UTC
Message-ID
<4542120E.1050903@candelatech.com>
In-Reply-To
<20061027052517.GB29057@spearce.org>
Shawn Pearce wrote:
Show 35 quoted lines
> Ben Greear <greearb@candelatech.com> wrote:
>   
>> I want to create an intermediate level..something like:
>>
>> kernel.org git tree
>>       |
>> my git master tree
>> /                          \
>> work-station-1   work-station-2  ....
>>     
>  
>   
>> I then did a git  checkout -f master on the
>> pub server and did a pull from the upstream kernel.
>> This seemed to work fine.
>>     
>
> Ah, what you really want here is to make your "my git master tree"
> a bare repostiory and use fetch instead of pull.  This way you
> don't need to maintain a working directory of files associated
> with that repository.  So assuming you have "mygitmastertree"
> as the directory do:
>
> 	mv mygitmastertree/.git mygitmastertree.git
> 	rm -rf mygitmastertree
>
> and update your workstation .git/remotes/origin files such
> that the URL line reads ".../mygitmastertree.git" rather than
> ".../mygitmastertree/.git".
>
> Then to update "mygitmastertree" with recent changes you can use
> git fetch rather than git pull:
>
> 	git --git-dir mygitmastertree.git fetch
>   
Ok, I made those changes...
Show 16 quoted lines
>  
>   
>> Then, on the work-station, I did a git checkout -f master, and also did 
>> a pull.
>> In this case, it seems that it is trying to merge with changes in the 
>> lf_v2.6.18 branch
>> instead of the the main 'master' tree (see below).
>>     
>
> When you use "git pull" with no additional arguments the first
> branch listed in a Pull: line of .git/remotes/origin will be the
> branch merged into the current branch.  I don't know what that
> branch is listed as in your workstation tree but from what you
> described it sounds like it may be that lf_v2.6.18 branch, which
> is why its trying to merge it.
>   
That is certainly not intuitive.

I want to synchronize the entire git repo, including all branches. How would I go about doing that?

Is there any way to recover my currently mangled tree on the workstation, or do I need to start fresh there? If I start fresh, do I re-clone, or is there some better way to get the synchronization that I want?

Thanks, Ben

-- 
Ben Greear <greearb@candelatech.com> 
Candela Technologies Inc  http://www.candelatech.com
Previous: Shawn PearceNext: Andy Parkins
Message 3 of 5 in “Question on multi-level git repository heiarchy.”
  1. Ben GreearOct 27, 2006
  2. Shawn PearceOct 27, 2006
  3. Ben GreearOct 27, 2006
  4. Andy ParkinsOct 27, 2006
  5. Ben GreearNov 16, 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.