1

I have a situation similar to the following:

  • SVN Revision 1
    • FolderA/FileA.ext

('svn move' used to move folder underneath a new folder)

  • SVN Revision 2
    • NewParent/FolderA/FileA.ext

Using SVN, I can verify the history is present for both revisions.

When I use 'git svn clone', the target folder contains both FolderA/FileA.ext and NewParent/FolderA/FileA.ext, and there is no history link between them.

How can I preserve the history link and only end up with the newer folder structure? I only need to migrate once (no link to SVN repo is needed).

n8n8baby
  • 493
  • 5
  • 16
  • Alternatively, how can I take NewParent/FolderA/FileA.ext and apply its history to FolderA/FileA.ext? – n8n8baby May 30 '14 at 22:38

1 Answers1

2

First, check that the history is indeed lost, by checking this answer or here:

git log --follow -- NewParent/FolderA/FileA.ext
# or
git log -M --summary -- NewParent/FolderA/FileA.ext 

If the link seems lost, you can try convert your svn repo using subgit, which does more work to keep all the svn information identical in the new git repo (as its author explains here).

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for the response. I did indeed try both of your suggestions. The 'git log' verified the files' histories are not linked. I was also unsuccessful in bending subgit to my will (and I am not sure we are under the ten developer limit for the free version). I am trying a "branch" argument trick for 'git svn clone', and it seemed viable on the subset I tried. Unfortunately, I had to leave and don't have access until Monday. – n8n8baby May 31 '14 at 18:13