* how to union 2 repos
@ 2008-05-26 10:08 Jamil Djadala
2008-05-26 11:10 ` Johannes Sixt
0 siblings, 1 reply; 2+ messages in thread
From: Jamil Djadala @ 2008-05-26 10:08 UTC (permalink / raw)
To: git
Hi all
quote from core-tutorial:
######### begin quote
Note
You could do without using any branches at all, by keeping as many local
repositories as you would like to have branches, and merging between
them with git pull, just like you merge between branches. The advantage
of this approach is that it lets you keep a set of files for each branch
checked out and you may find it easier to switch back and forth if you
juggle multiple lines of development simultaneously. Of course, you will
pay the price of more disk usage to hold multiple working trees, but
disk space is cheap these days.
########## end quote
I still can't realize how to union 2 git repositories with linear
history, into 1 repo with 2 branches.
i try git-rebase, but results are unexpected.
i have 2 repos with history, assuming initial commit in both repos are
same:
1:
a-b-c-d-e-f
2:
a-B-C-D-E-F
i want repository with this history:
a-b-c-d-e-f
\B-C-D-E-F
i try following:
1. copy objects from other repo :
git-fetch ../other/.git +master:otherMaster
history after this command is 2 unconnected chains:
a-b-c-d-e-f a-B-C-D-E-F
2.Then i try following:
git-rebase --onto a f F
but results are strange
(git, complain about merge errors, history is like:
x-x-x-x-x-x-----------x
\x-x-x \x-x-x-x-x
)
can someone help me how to do this ?
Thanks in advance
--
Jamil Djadala <djadala@datamax.bg>
Datamax
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: how to union 2 repos
2008-05-26 10:08 how to union 2 repos Jamil Djadala
@ 2008-05-26 11:10 ` Johannes Sixt
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Sixt @ 2008-05-26 11:10 UTC (permalink / raw)
To: Jamil Djadala; +Cc: git
Jamil Djadala schrieb:
> i have 2 repos with history, assuming initial commit in both repos are
> same:
>
> 1:
> a-b-c-d-e-f
> 2:
> a-B-C-D-E-F
>
>
> i want repository with this history:
>
> a-b-c-d-e-f
> \B-C-D-E-F
$ git fetch ../other master:otherMaster
$ echo $B $a > .git/info/grafts
$ git filter-branch -- --all
The man page of git-filter-branch mentions the grafts trick.
-- Hannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-26 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-26 10:08 how to union 2 repos Jamil Djadala
2008-05-26 11:10 ` Johannes Sixt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).