I am trying to checkout a specific revsion of my svn codebase.
Normally, to checkout, I just typegit svn clone svn+ssh://path_to_codebase
. I need to checkout an older version of the codebase. How do I do that?
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?
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With