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

move files between disparate repos and maintain version history

From
davetron5000 <davetron5000@gmail.com>
Date
Mar 2, 2009, 20:30 UTC
Message-ID
<0d8965bb-e2ed-4f49-b323-c110f605ae2c@33g2000yqm.googlegroups.com>

Using git-svn at work, and had to do some svn moves that I'm wondering would be handled with git?

Our repo is setup like this:

$SVNROOT/main/core/{trunk,tags,branches} $SVNROOT/main/app/{trunk,tags,branches}

core and app are treated as different project roots internally, and my git-svn treats them as such.

We recently needed to move some files from app to core. I could've just moved them in between my git repos, but the version history would be lost, since these are two separate repos. I did the move via svn mv, which works simply because our "separate projects" are really just in the same SVN repo.

So, is there a way I can move a file between two git repositories, maintaining the change history? I guess it would be something like "apply all patches that this file was involved in, but ONLY apply the ones affecting this file, to the new repo, then delete from the old"?

Next: Jeff King
Message 1 of 7 in “move files between disparate repos and maintain version history”
  1. davetron5000Mar 2, 2009
  2. Jeff KingMar 3, 2009
  3. David CopelandMar 3, 2009
  4. Jeff KingMar 3, 2009
  5. David CopelandMar 3, 2009
  6. Peter BaumannMar 3, 2009
  7. Jeff KingMar 3, 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.