-
Create New Volume
-
If you're on OS X you'll have to do this. It creates a new volume (named migration) on your machine under
~
that's 1GBjava -jar ~/svn-migration-scripts.jar create-disk-image 1 migration
-
-
Create authors list.
Important, if you get any kind of error about authors here or in the cloning, fix the username manually
- if you have the repo already pulled from SVN
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors.txt
- You can use the migration jar and just add the svn repo
java -jar svn-migration-scripts.jar authors [repo-url] > authors.txt
- if you have the repo already pulled from SVN
-
Move authors list and jar to new disk image (or folder where you want it)
-
Clone SVN Repo (this will take forever)
- FYI, you can use
git svn clone file:///e/svn_repo_on_E_drive
to clone a local repo
git svn clone --stdlayout --authors-file=authors.txt --no-metadata [svn-repo-url] [repo-name] && cd [repo-name]
❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗ ❗
- FYI, you can use
-
Run these commands in this order, these should clean all of the branches/tags/refs
for b in `git branch -a | grep "remotes/origin/tags/"`; do t=`echo $b | cut -d - -f 2`; git tag $t $b; done for b in $(git for-each-ref --format='%(refname:short)' refs/remotes); do git branch $b refs/remotes/$b && git branch -D -r $b; done for p in $(git for-each-ref --format='%(refname:short)' | grep @); do git branch -D $p; done
-
Create .gitignore
printf '%s\n' ' .data' '*/classes' 'cwallet.sso' '*.swp' '*.lck' '.DS_Store' >.gitignore
7) Review the local repo, make sure it's all there
```sh
git tag -l
git branch -a
git log (exit with q)
```
8) Commit changes
```sh
git add --all
git commit -am "added .gitignore, svn => git merge
```
-
Add remote (obviously make a repo)
git remote add origin [repo-url]
-
Push to remote
git push --all git push --tags
-
Optional (Delete branches and tags you don't want)
git branch | grep -v "master" | xargs git branch -D