Skip to content

Instantly share code, notes, and snippets.

@angus65
Last active Feb 14, 2017
Embed
What would you like to do?
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