Christian Pointner

Logo Vorschlag

About

svn2git

# mkdir /tmp/svn2git

inside old repo

# svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > /tmp/svn2git/authors-transform.txt

edit /tmp/svn2git/authors-transform.txt

# cd /tmp/svn2git/
# git svn clone -s -A authors-transform.txt https://[ old-svn-repo-url ]/[ repo ]/ [ repo ]
# cd [ repo ]
# git gc --aggressive
# git filter-branch -f --msg-filter 'sed -e "/git-svn-id:/d"' -- --all
# rm -r .git/refs/original
# git remote add origin [ git-repo-url ]:[ repo ].git
# git push --all origin
# git branch --set-upstream-to origin/master master
# git pull

this should give you an 'Already up-to-date.'

# cd ../..
# rm -rf /tmp/svn2git

# cd path/to/new/repo
# git clone [ git-repo-url ]:[ repo ].git

inside old svn repo find all svn ignore tags and edit .gitignore

# svn proplist -Rv
 
equinox/equinox.txt · Zuletzt geändert: 2015-04-14 02:58 von equinox
Letzte Änderungen · Zeige Quelltext · Admin · Anmelden