Place these scripts anywhere in $PATH
(e.g. create symlinks in
/usr/local/bin
) and make sure they are executable, just like any other
script. The git
command will know how to find them.
See my detailed blog post for a how-to.
In brief:
-
git svn clone your repo, preferably using Sam Vilain's svn-merge-attrs branch, using
--prefix svn
. This assumes standard layout. -
inside the repo run
git svn-abandon-fix-refs
-
create
.git/info/grafts
for merge commits (might not be necessary with the svn-merge-attrs branch). -
run
git svn-abandon-cleanup
The resulting repository should have only refs/heads/*
and tags. All svn tags
are recreated as annotated tags.
git-svn-id:
and svk message pollution is cleaned up.
When you have a merge commit that is not recognized as such, the grafts file can be used to add additional parents, preserving history information.