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:
- Is it possible with GIT to remove the file only from the index?
- Git-svn unpicked cherries
- SVN, GIT or Mercurial for local servers
- Git move from SVN: Where does git 2.6 store svn tracking branches?
- How to use git-svn when SVN repository really contains multiple “repositories”?
- Git tag - Checkout issue
svn merge -c -28693,-28756,-28747 https://repository/trunk
How to make the same with git-svn?
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)