我怎样才能知道我的git-svn存储库所基于的svn版本? [英] How can I tell what svn version my git-svn repository is based on?
问题描述
我已经使用git-svn将SVN存储库克隆到git中,但是我有
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.
有什么想法可以找到当前git-svn克隆所基于的SVN版本号吗?
Any idea how I can find the SVN revision number my current git-svn clone is based on?
推荐答案
如果您执行git log
,则应该能够查看存储库中所有提交的历史记录.其中的第一个将对应于您的git存储库所克隆的SVN版本.
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
在这种情况下,您可以看到我是从远程SVN存储库的修订版51174(此处使用的伪路径和名称)克隆的.
In this instance, you can see that I have cloned from revision 51174 of the remote SVN repo (fake paths and names used here)
您可以使用--skip=<number>
选项(例如git log --skip=100
)简化git log
的输出,尽管这要求您从最初克隆存储库以来对提交次数有所了解.
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.
这篇关于我怎样才能知道我的git-svn存储库所基于的svn版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!