Set Up authors-transform.txt
This file is used to map SVN users to Git committers. The authors-transform.txt file should be plain text, containing lines like:
joe = Joe Smith <joe@smith.com>
jane = Jane Smith <jane@smith.com>
Clone the Subversion Repository
git svn clone <Subversion_URL> --no-metadata -A ~/authors-transform.txt --stdlayoutNote: the URL should not contain "trunk".
Manual Fixes
The git svn clone creates a bidirectional repository, ie you can commit your changes back to SVN, and also make further updates. This is not what we want here - we want to migrate away from SVN for good.
The fixes I like to do manually:
- create .gitignore file (use svn propget svn:ignore on a checked out svn rep)
- check unhandled stuff in .git/svn/refs/remotes/trunk/unhandled.log -- e.g. keywords ($Id$, etc) are not supported by git
- remove links to the Subversion repository (more might be needed, check your .git directory sturcture):
- rm .git/refs/remotes/trunk
- rm -r .git/svn
- edit .git/config -- remove Subversion specific parts
Push to a Remote Repository
This part is less related to the topic, just for reference. Assuming you have a different host storing repositories:
[on the remote host] mkdir <git_repo_dir>; git init --bare <git_repo_dir>
[on the local host] git remote add origin <user>@<host>:<git_repo_dir>; git push -u origin master
No comments:
Post a Comment