简体   繁体   中英

git-svn: How do I sync to an svn revision?

I have a cloned git-svn repo. Using "git svn rebase" will get me latest revision of svn, but how do I get an svn revision like I do with "svn update -rXXXXX"?

EDIT:

What I meant is to update to an upstream svn revision as opposed to a local git change set.

Update:

I accepted Greg Hewgill's answer, although the real solution is in his comments, as following steps:

  1. git svn rebase
  2. git log, and find commit ID that is between the local svn revision before Step 1 and latest upstream svn revision.
  3. git checkout commitID

找出哪个Git提交标识符对应于您感兴趣的Subversion修订版( git log可以在这里帮助),然后使用git checkout检查该提交。

git-svn creates one commit for every revision. You can use git checkout <branch> <commit-id> to check out that commit.

You can use git log to find the appropriate commit, especiall with the grep flag: --grep=<pattern> Limit the commits output to ones with log message that matches the specified pattern (regular expression).

This is important because the revision should be in the commit message that git-svn creates.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM