Importing Subversion to GIT: problem with subpaths

We currently run a big subversion repository, and I'm trying to move it to GIT. The problem is that it uses trunks and tags below the root directory. For example:

MyDepartment\MyOS\Project1\trunk\ <-- master branch MyDepartment\MyOS\Project1\branch\v1 <-- other branch MyDepartment\MyOS\Project1\tags\v1_20100101 <-- release tag

There are different departments, OS's, and many different projects.

So when I clone the SVN repository using --stdlayout:

git svn clone --stdlayout http://svn-repository/

The clone ends up empty. Without the option, I get a clone, but then branches are treated as directories on the master branch.

  1. Is there a way to import this directory structure in one go?
  2. If I write a script to import all the Projects separately, is there a way to combine the per-project GIT imports into one big GIT repository?

-------------Problems Reply------------

If I understande the question correctly, you want:

git svn clone

Update: you can include more then one --branches and --tags:

git svn clone

You cannot have more the one trunk evidently.

Git is really designed to support one project per one repository and not multiple projects in one repo. I suppose you will hit many problems trying to use it like that.

Look into Git submodules. You'll probably have to import each of your subprojects separately, but the result may mirror your current usage a little better.

Category:svn Views:0 Time:2010-06-19
Tags: svn git git svn

Related post

  • Import Subversion repository into Git 2011-07-14

    I have an existing SVN repository at Out of curiosity, I created a repository at as well, and added some files to it. Can I now take the Sousa folder and im

  • Storing a repository in subversion and git 2010-05-05

    I'm currently trying to convince my company to migrate to git from subversion, and one thing that would be really helpful would be to allow me to store a repository in subversion and git at the same time (then I can show them how easy it is to do in

  • Interfacing Subversion with git 2011-05-08

    I do a lot of my coding on my school Mac, but I can't install any new programs on it due to school policy. I've been using SVN for all my projects since it's pre-installed, but I would like to migrate to git. Is there any way to use Subversion alongs

  • Import a existing git project into Eclipse without a .project file 2011-08-10

    I've forked and clone to local machine a project from github using terminal, and am trying to import it into Eclipse. Problem is, the clone from github doesn't have a .project file, so when I go import->projects from git, I can only import as a ge

  • i try to import a sound in my flash game. It shows "one or more files were not imported because there were problems reading them". Help me 2009-08-11

    i try to import a sound in my flash game. It shows "one or more files were not imported because there were problems reading them". Help me --------------Solutions------------- Either the file is corrupt (some programs handle that better than others),

  • does Java have API wrappers around subversion and Git? 2009-12-28

    Curious if there any API wrappers for Git and Subversion for Java? I want to be able to pullup the changesets and souce code (and diffs) from Subversion and Git repos. Is this possible? Any pre-built APIs? --------------Solutions------------- A quick

  • which class/jar file in fisheye hooks into subversion and GIT? 2010-01-04

    which class/jar file in fisheye hooks into subversion and GIT? I want to use it to extend the functionality a bit. --------------Solutions------------- For Subversion, FishEye can either use SVNKit (the pure-Java Subversion client) or JavaHL (the nat

  • Migrating from Subversion to Git how can I find a commit given a revision number? 2010-06-07

    Migrating from Subversion to Git using svn2git (which internally uses git-svn) I'd like to know how I can find a specific revision commit. It is quite common to have issues tracker to have comments like: "Fixed in r12345". Given this, I'd like to be

  • how to seamlessly integrate subversion and git? 2010-06-16

    I'm looking for tips on how to seamlessly integrate subversion and git, for deploying web sites by a small team of web developers. We each have our own development versions of our sites on our local machines. We also have dev, staging, and live serve

  • Migrating from Subversion to Git 2010-06-23

    I have a lot of pre-existing projects and code in a few different Subversion repositories. I am planning on getting my toes wet with Git by migrating a few of the easier/soon to be multi-developer projects to Git. I have a few questions: If I start w

  • Problem importing project into git 2011-01-13

    I am new to web development. I just managed to develop an application using cakephp on shared hosting. I am trying to import the project into git. I am new to git. I have all php files. I read through the documentation on importing to git. I have suc

  • Transitioned from Subversion to Git, how do I push to heroku gracefully? 2009-09-25

    I had been using a Subversion for my source control, combined with git ONLY to deploy (push) to heroku. My pattern was: Update local working copy from latest master at remote subversion repository. Then do git commit and git push heroku (Git was set

  • What gets lost in a roundtrip between Subversion and Git? 2011-03-02

    I have been thinking about doing some history rewriting on my Subversion repository, but Subversion is at the moment not very good at that. One option would be to convert to Git (which I gather is considerably better at that sort of thing), do the re

  • fast-import/fast-export git/bzr: what is the importance of the marks files to history integrity? 2011-07-13

    I'm currently using git-bzr-ng to import a number of branches from a bzr repository and I've discovered that if you use different target branches for each imported branch the tool does not use the same import and export marks files. Some reading of t

  • Migrating from Subversion to Git where repository was not initially using standard layout 2011-11-18

    I am try to migrate a Subversion repository which was not initially using the standard layout. I cannot figure out how to migrate it. For Example. In SVN Rev 1. - 700, the layout is [svn]/projectfile [svn]/projectfile2 Until the revision 700 then it

  • Build project imported from Eclipse git as Android Project 2011-11-20

    So I used Eclipse git to import an android application's source code and resources into my workspace. Problem is, I imported it as a general project and I'd like to know how to build the project as an android application. My Import Options: ---------

  • How can I track a single branch on subversion with git 2010-01-29

    I'd like to track a remote branch on SVN from within Git. I can see the basics of how to do this with the git-svn command, I was hoping to do something like the following: Git branch | SVN branch ----------------------- master | Trunk feature1 | <

  • git problem: made mistake with creating branch and cannot push to master anymore 2010-05-13

    I did git checkout -b foo origin/master git push origin foo to create a branch and push it to the remote repo. This is obviously the wrong way to do it (I'm a git beginner). But apart from being wrong, it created a much more serious problem: Now we c

  • How do I import an existing GIT project into SVN, preserving GIT history on master branch? 2010-07-19

    I've a project developed with GIT and have a few hundred commits. I only have one master branch and the commits are linear. Now I'm asked to put the source into an existing SVN and ultimately I'd like to preserve the master commit history (the messag

Copyright (C), All Rights Reserved.

processed in 0.153 (s). 11 q(s)