Thread (5 messages) flat view 5 messages, 3 authors, 2016-08-11

Re: Question on multi-level git repository heiarchy.

From: Shawn Pearce <hidden>
Date: 2016-08-11 19:48:32

Ben Greear [off-list ref] 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
 
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.

-- 
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help