Skip to content

Instantly share code, notes, and snippets.

@mhoyer
Created January 27, 2012 00:17
Show Gist options
  • Save mhoyer/1686074 to your computer and use it in GitHub Desktop.
Save mhoyer/1686074 to your computer and use it in GitHub Desktop.
Sample to check feasability of converting complex SVN repos to git repos
root=/tmp/svn-git-convert/
rm -fr $root
mkdir $root
svnadmin create $root/foo.svn
svn co file://$root/foo.svn $root/foo
pushd $root/foo
echo == Create initial commit
mkdir trunk
touch trunk/bar.txt
svn add trunk
svn commit -m "+ added bar.txt"
echo == add sample binary
mkdir trunk/bin
touch trunk/bin/binary.dll
svn add trunk/bin
svn commit -m "+ added binary"
echo == "branch" release-1.0
mkdir branches
svn add branches
svn commit -m "+ added branches folder"
svn copy trunk branches/release-1.0
svn commit -m "Y branched release-1.0"
popd
git svn clone file://$root/foo.svn $root/foo.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment