Monday, July 12, 2010

Initialising a git-svn repo from a given date

The issue is that git-svn only lets you specify a revision number from which to init a repository. So first you have to find out the revision number at which your repository was at a given date.

You need to use SVN for that, and it's log command:

svn log -r {2009-12-31}:{2010-01-01}

This command will log all svn commits which happened between the 31st of December 2009 and the following day, 1st of January 2010.

Then from the logs just pick the commit from which you want to init your git-svn repository and there you go:

git svn clone -s -r72569:HEAD

Here the chosen revision is r72569

No comments:

Post a Comment