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

How to move subdirectories from one svn repos to another.

From
JWJosef Wolf <jw@raven.inka.de>
Date
Jan 31, 2009, 12:33 UTC
Message-ID
<20090131123336.GA1702@raven.wolf.lan>
Hello,

I would like to move a complete subdirectory with all its history from one svn repository to another.

For this, I have created a git repository with the two subversion repositories as remotes:

  REPOSROOT=https://foo.bar.com/repos
  mkdir -p migrate
  cd migrate
  git svn init --stdlayout $REPOSROOT/my-repos
  
  for i in my-repos their-repos; do
    git config svn-remote.$i.url                   $REPOSROOT/$i
    git config svn-remote.$i.fetch         trunk:refs/remotes/$i/trunk
    git config svn-remote.$i.branches branches/*:refs/remotes/$i/*
    git config svn-remote.$i.tags         tags/*:refs/remotes/$i/tags/*
    git svn fetch -R $i
    git checkout -b $i $i/trunk
  done
  
  git gc

Now I would like to move one directory (call it bar) from my-repos to their-repos. Problem is: there are thousands of changesets in this directory. So I got somewhat stuck (I am new to git). Do I have to cherry-pick every changeset separately? Or is there some way to merge all the changesets touching this specific directory?

Any hints?
Message 1 of 1 in “How to move subdirectories from one svn repos to another.”
  1. Josef WolfJan 31, 2009

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.