Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

how to migrate from SVN repo to Git repo

Haojian Wu edited this page Nov 16, 2013 · 3 revisions

Clone svn repository

Create a user.txt files for mapping programmers to Git:

Abc = Abc@email.com
bcd = bcd@email.com

Then run the following commands:

// If svn repo is std repo, use -s option
git svn clone svn://hostname/path --authors-file=user.txt
// update with svn repo
git svn rebase
// show svn ignore files
git svn show-ignore

##Set svn remote url in git repository

If you clone the repository from git directly, you want do update the remote svn repository directly, you need to do following configure:

Edit .git/config files, add following fields:

[svn-remote "svn"]
	url = svn://url
	fetch = :refs/remotes/git-svn
[svn]
	authorsfile = authors-transform.txt
// show commit id
git show origin/master | head -n 1
echo <commit_id> > .git/refs/remotes/git-svn
git svn fetch

Reference:

http://trac.parrot.org/parrot/wiki/git-svn-tutorial

http://viget.com/extend/effectively-using-git-with-subversion

http://stackoverflow.com/questions/79165/how-to-migrate-svn-with-history-to-a-new-git-repository

Tech-Notes

LLVM/Clang

C/C++

Linux

Vim

Tools

Others

Chromium-Dev tips

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /