Skip to the content.
  1. Checkout svn folder(s)
    a. Git svn clone
  2. Remove unneeded folders from repo using git-filter-repo. Use first to give a list of paths to include. Use second to give a list of paths to delete.
    a. Git filter-repo –path folder1 –path folder2
    b. Git filter-repo –path excludeFolder1 –path excludeFolder2 –invert-paths
  3. Fix authors. Svn authors to git authors using git-filter-repo.
    a. Git filter-repo –mail-map path-to-mailmap-file
    b. File contains data in the following format
    • New-Name Old-Name
    • New-Name Old-Name
  4. Move folders and history if needed using git-filter-repo
    a. git filter-repo –path-rename old-path:new-path
    b. Example: git filter-repo –path-rename OldParentFolder/MyProject/:MyProject/
  5. Replace paths in contents of file using BFG repo cleaner. (Example solution or projects (*.sln, *.csproj))
    a. Git-filter-repo can also replace the contents of the files, but I could not figure out how to filter replace in only certain files.
    b. java -jar bfg.jar –replace-text replacements.txt -fi *.php my-repo.git
    c. -fi allows provision of filters
    d. Bfg repo does not change the files in the head commit.
    e. Amend head commit with the changes if needed.
    • Select the files in tortoise-git log window (sln, proj files)
    • Revert the files
    • Git commit –amend
  6. Add git remote
  7. Git push