You can extract one into the other :
$ cd project1 $ git config remote.project2.url /path/to/project2 $ git config remote.project2.fetch 'refs/heads/*:refs/project2/*' $ git fetch project
This will give you two (or more) branches containing the history of project1 and project2. They are still completely independent, just use the same store of objects.
Then (not tested) you could use the graft file ( .git/info/grafts ), where you could overwrite the parental control of the commit (for example, the first of the projects2, which has the last of the projects1 for the parent)
As Dustin says in the comments, in order to “make it permanent,” reordering occurs by replaying project2 to project1.
You have another illustration in this section Using Git Inside a Project (Deployment) is a “blog post, especially the section“ How to Make Friends and Influence People ”. Again:
git checkout two_point_ooh git remote add strelau git:
is a similar process, but for repositories that are forked (which is not quite so)
VonC Mar 16 '09 at 18:30 2009-03-16 18:30
source share