Last active
February 14, 2017 20:36
-
-
Save angus65/9056669 to your computer and use it in GitHub Desktop.
SVN to Git conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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