[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: Migrating from SVN
From:       Christoph Bartoschek <bartoschek () gmx ! de>
Date:       2010-03-26 11:15:58
Message-ID: fkhu77-7hm.ln1 () burns ! bruehl ! pontohonk ! de
[Download RAW message or body]

Heiko Voigt wrote:

> Import them all seperately into git (e.g. using git svn) and then have a
> look at subtree merge
> 
> http://www.kernel.org/pub/software/scm/git/docs/howto/using-merge-
subtree.html
> 
> to merge them all together. That way you will have seperate lines of
> history for each project and one (or five) big merges on top.
> 
> AFAIK the revision number from svn is stored in the commit message if
> you use git svn so to add the project name you might want to use git
> filter-branch to add that name to each commit before merging the history
> lines.
> 
> That way you will have all the history of the now seperate projects in
> one git repository. Keep in mind that after doing that its not that easy
> to make them seperate projects again.

Thanks for your suggestion. Unfortunately I do not want to have separate 
lines of history. 

For example if the subversion revisions are like this:

rev 0: Initial import
rev 1: Change in project_A
rev 2: Change in project_B
rev 3: Change in project_A
rev 4: Change in project_C

Then I would like to have in git for the product_1 line:

First commit: The commit consists of the initial import.

Second commit: The commit consists of rev 1 of project_A and rev 0 of 
project_B and rev 0 of project_C.

Third commit: The commit consists of rev 1 of project_A and rev 2 of 
project_B and rev 0 of project_C

Fourth commit: The commit consists of rev 3 of project_A and rev 2 of 
project_B and rev 0 of project_C.

Fifth commit: The commit consists of rev 3 of project_A and rev 2 of 
project_B and rev 4 of project_C.

This does not yet include branches. But how can I get a history like that in 
git?

A similar line of history would appear for product_2 and when they are 
merged, I can use a subtree merge as sugested to combine them. 

Christoph

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic