How to revert multiple revisions with git-svn

I need to revert multiple revisions (e.g. 28693, 28756, 28747) which are already in svn repo.

With svn I can achieve this with one command:

svn merge -c -28693,-28756,-28747 https://repository/trunk

How to make the same with git-svn?

  • git-svn fetch fails on file whose size > LONG_MAX
  • Publishing a “git svn” repo
  • GIT: how to revert back only one historical change while keep others as they are?
  • git svn clone fails because of deleted branch
  • How to choose --prefix for git svn clone
  • How can I import part of an SVN repo into an existing git repo, retaining history?
  • git svn show-ignore gives error “command returned error: 1”
  • svn2git migration: Rules
  • One Solution collect form web for “How to revert multiple revisions with git-svn”

    git revert <commit1> <commit2> ... should do the trick.

    Edit following the discussion:
    If you don’t know the hashes (you can find the SVN revisions in the git log by looking at the git-svn-id field, it’s the number after the @), the following one-liner works for me:

    git revert $(echo r<REV1> r<REV2> r<REV3> | xargs -n1 git svn find-rev)
    Git Baby is a git and github fan, let's start git clone.