Skip to content

Instantly share code, notes, and snippets.

@angus65
Last active February 14, 2017 20:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angus65/9056669 to your computer and use it in GitHub Desktop.
Save angus65/9056669 to your computer and use it in GitHub Desktop.
SVN to Git conversion
#Create Authors File
java -jar svn-migration-scripts.jar authors http://10.20.101.11:8080/svn/PVM_Web/ choffman > ~/authors_temp.txt
#use Git to clone the SVN Repo to local folder
git svn clone --stdlayout --authors-file=authors.txt http://10.20.101.11:8080/svn/PVM_Utilities/trunk/EdiDownload ediDownload
#NON standard repos.... like Utilities
git svn clone --authors-file=authors.txt http://10.20.101.11:8080/svn/PVM_Utilities/trunk/EdiDownload ediDownload
#find out what branches will be moved to git and what tags will be moved
java -Dfile.encoding=utf-8 -jar svn-migration-scripts.jar clean-git
#Remove any cab files
java -jar ~/bfg.jar --delete-files *.{cab} supportPortal/.git/
#Remove any dll files
java -jar ~/bfg.jar --delete-files *.{dll} supportPortal/.git/
#Remove any pdb files
java -jar ~/bfg.jar --delete-files *.{pdb} supportPortal/.git/
#remove the packages folder
java -jar ~/bfg.jar --delete-folders packages supportPortal/.git/
#compress everything now that all the blobs are removed
git reflog expire --expire=now --all
git gc --prune=now --aggressive
#do the acutal move of the branches and tags
java -Dfile.encoding=utf-8 -jar ~/svn-migration-scripts.jar clean-git --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment