Hi Berin,

If you manged to convert individual svn repositories to git, each with
corresponding directories inside, than it's a piece of cake to finish it.

A git repository can have multiple trees in it.
Just push all repositories into one but on different branch naming and then
merge those branching together.

1. create a fresh main repo in a new directory with git init and make a
fresh initial empty commit with git commit  --allow-empty -m "initial empty
commit".
2. for each of your repo, add it as remote with git add remote main
<main-directory> and push under a different branch: git push main
master:master-core, git push main master:master-wpf, etc.
3. go back in the main repository and merge all the other master branches
in master.

Regards,
Alex


On Tue, Jan 19, 2016 at 3:41 PM, Berin Loritsch <be...@d-haven.org> wrote:

> We're a C# development shop, and I've gone through the trouble of making a
> script that will safely migrate stand-alone SVN projects into a Git
> repository without problems.  There's a lot of support for Git to promote
> subdirectories up the directory structure, but not much support to push
> them down the directory structure.
>
> My problem is this:
>
>    - For legacy reasons we have a set of projects that were always
>    included as externs in a larger project.
>    - Those "extern" projects also have a separate repository for unit
>    tests, etc.
>    - I want to create a new C# solution to merge everything about these
>    extern projects so I can turn them into nuget packages and all
>    related source code in one place
>
> We have a mess that we did to ourselves.  I can pre-stage what I want to
> do in Subversion, but it will break all the externs--which just compounds
> the work.  While I did see some fancy git index filtering commands to push
> the contents of a git repository down a directory I haven't been able to
> get them to run correctly in Git for Windows.
>
> Let's say we have the following SVN structure:
>
>    - Common
>       - trunk
>       - branches
>       - tags
>    - Common.WPF
>       - trunk
>       - branches
>       - tags
>    - Common.WinForms
>       - trunk
>       - branches
>       - tags
>    - Unit Tests
>       - trunk
>       - branches
>       - tags
>
>
> I want to create one Git repository that looks like this:
>
>    - Common
>       - Core
>       - WPF
>       - WinForms
>       - Test
>
> All while preserving the history for each of these.  Converting the
> individual projects to a Git repository isn't a problem.  It's merging them
> together so I can finish the job of turning these into libraries we
> reference rather than embed.  Even if you convince me that Core, WPF, and
> WinForms should be in separate repositories, the Unit Tests that go against
> Core code need to be merged in to that project.
>
> Is there anything that would allow me to create a parent Git repository
> and do separate Git SVN mounts for the subfolders?  That would be ideal.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to