migrating a subversion repository to a pure git repository

Easy Peasy it is …

1. A users list in the below format:

rk = Rajesh Kanna <rk@gmail.com>

mk = Mahesh Kanna <mk@gmail.com>

You can also use the fetch-svn-authors.sh script to generate a users list.

2. Run the following commands now.

mkdir my_app_tmp

cd my_app_tmp

git svn init http://svn.company.net/app/trunk/ –no-metadata

git config svn.authorsfile ~/root/users.txt

git svn fetch

All the commands above are self explanatory if you have worked with git a while. Also, the no-metadata is preceded with two hyphens.

3.  Now get a clean git repo from the git-svn repo.

git clone my_app_tmp my_app

Note: You can also give –bare switch if you want to host it via gitosis, apache + smart-http, etc.

And thats it, you are done.

Import a GIT repository into Subversion

Link: Import a Git repo into Subversion

There are many posts on how to go from subversion to Git, but I couldn’t find a single one on how to go from Git to subversion.

a crash course on git svn.

Link: a crash course on git svn.

Stats

  • 142,057 Hits and counting...

Archives

Follow

Get every new post delivered to your Inbox.