git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Split a subversion repo into several git repos

From
Sam Vilain <sam@vilain.net>
Date
Oct 11, 2007, 21:40 UTC
Message-ID
<470E9858.5050904@vilain.net>
In-Reply-To
<27DDC599-C7A0-4660-B5C6-7DFCEB137C14@steelskies.com>
Jonathan del Strother wrote:
Show 27 quoted lines
>> For example, I want to convert one subversion repository which  
>> contains the folders:
>> trunk/projectA
>> trunk/projectB
>>
>> into two git repositories:
>> projectA.git
>> projectB.git
> 
> I have a slightly different layout to you -
> 
> projectA/trunk
> projectA/branches
> projectA/tags
> projectB/trunk
> projectB/branches
> projectB/tags
> etc
> 
> - but I've been creating separate git repos from that with (for  
> example) :
> 
> git-svn init -t tags -b branches -T trunk http://svn.host.com/projectA
> git-svn fetch
> 
> 
> Or will git-svn not work with your sort of layout?
It does work.  Use:
git-svn init -t projectA/tags -b projectA/branches \
   -T trunk/projectA http://svn.host.com/
git fetch

Also you can expect the import results of each branch to be the same regardless of whether you import all at once using a command like the above, or import a single path without passing -t / -b / -T to git svn init.

If you have a lot of projects to mine from a single repository, use svnsync or SVN::Mirror/svk and then import from the local repository with --use-svm-props.

Sam.
Previous: Karl HasselströmNext: Eivind LM
Message 7 of 11 in “Split a subversion repo into several git repos”
  1. Eivind LMOct 11, 2007
  2. Patrick DoyleOct 11, 2007
  3. Eivind LMOct 12, 2007
  4. Jonathan del StrotherOct 11, 2007
  5. Patrick DoyleOct 11, 2007
  6. Karl HasselströmOct 11, 2007
  7. Sam VilainOct 11, 2007
  8. Eivind LMOct 12, 2007
  9. Jonathan del StrotherOct 12, 2007
  10. Eivind LMOct 12, 2007
  11. Sam VilainOct 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.