Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I checkout a specific revision of my svn codebase using git svn

Tags:

git

svn

git-svn

I am trying to checkout a specific revsion of my svn codebase. Normally, to checkout, I just type
git svn clone svn+ssh://path_to_codebase. I need to checkout an older version of the codebase. How do I do that?

like image 372
Anonymous Avatar asked Jul 03 '13 23:07

Anonymous


2 Answers

I used the following and I obtained an older revision.

git checkout `git svn find-rev revision_number`   

Does anyone have any comments about this?

like image 91
Anonymous Avatar answered Sep 30 '22 19:09

Anonymous


You can git svn clone it as usual and then use the usual tools -- git checkout can give you access in a "floating" way or create a new git branch at your desired point.

You can also use git svn init (note it behaves slightly differently than git init) and then git svn fetch -r XXX to fetch a specific revision. This is much faster if the repository is large, but a future git svn fetch will fetch the rest of the revs (but never any earlier revs).

like image 20
Ben Jackson Avatar answered Sep 30 '22 19:09

Ben Jackson