Skip to content

Instantly share code, notes, and snippets.

Last active February 14, 2017 20:36
What would you like to do?
SVN to Git conversion
#Create Authors File
java -jar svn-migration-scripts.jar authors choffman > ~/authors_temp.txt
#use Git to clone the SVN Repo to local folder
git svn clone --stdlayout --authors-file=authors.txt ediDownload
#NON standard repos.... like Utilities
git svn clone --authors-file=authors.txt 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