Created
January 27, 2012 00:17
-
-
Save mhoyer/1686074 to your computer and use it in GitHub Desktop.
Sample to check feasability of converting complex SVN repos to git repos
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
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