Reputation: 200
I've cloned an SVN repository into git using git-svn, but I'm having trouble rebasing and I thought to work around it by using svn to generate a patch between the old SVN revision I'd used to clone my git repo in the first place and the current version. That way I could just apply the patch and call it rebased.
Any idea how I can find the SVN revision number my current git-svn clone is based on?
Upvotes: 2
Views: 597
Reputation: 3133
If you do git log
you should be able to see a history of all commits in your repository. The first of these will correspond to the SVN revision that your git repository was cloned from.
So, you might see something like this:
commit e3223a9f72fa80b16dbe1a471c73657a4cacee3d
Author: joe <joe@31875c6e-e9e7-0310-b337-c57ebf30f660>
Date: Tue Feb 22 14:30:26 2011 +0000
PO-310: Commit message here
git-svn-id: https://svn.myrepo.com/development/trunk@51174 31875c6e-e9e7-0310-b337-c57ebf30f660
In this instance, you can see that I have cloned from revision 51174 of the remote SVN repo (fake paths and names used here)
You can simplify the output from git log
by using the --skip=<number>
option (e.g. git log --skip=100
, though this requires you to have some idea of the number of commits since you initially cloned the repository.
Upvotes: 2