Every repository with this icon (
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.mkdn | Mon Nov 02 06:09:09 -0800 2009 | |
| |
git-svn-abandon-cleanup | Fri Jun 12 02:56:31 -0700 2009 | |
| |
git-svn-abandon-fix-refs | Sat Oct 24 11:26:35 -0700 2009 | |
| |
git-svn-abandon-msg-filter | Fri Jun 12 03:43:30 -0700 2009 |
Installation:
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.
Usage:
See my detailed blog post for a how-to.
In brief:
Install (above), then 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-refsCreate
.git/info/graftsfile for merge commits (might not be necessary with the svn-merge-attrs branch). This is just if you have any svn merges that occurred between branches.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.
Troubleshooting:
You may get this error message:
% git svn-abandon-fix-refs
git: 'svn-abandon-fix-refs' is not a git-command. See 'git --help'.
This means you haven't placed those scripts in your PATH.
Maintenance:
These commands are more for abandoning SVN in favour of git and getting as clean a history as possible. Maintenance is just like a normal git repository.
After git svn-abandon-cleanup has been run, git svn rebase can't be run
anymore, so you can't bring it up to date without keeping the old SVN repo
around and grafting things to the conversion.







