7

I made a mistake in a git svn dcommit and would like to undo the commit. (I was actually trying to push to a branch, but pushed to trunk instead.) How can I do this with git-svn?

3
  • 1
    try here stackoverflow.com/questions/2318777/… Commented Aug 7, 2012 at 17:57
  • 4
    So the idea would be use git revert <commit_hash> and then git svn dcommit? Commented Aug 7, 2012 at 18:12
  • 1
    Yep... write that as an answer and I'll vote for you. Commented Aug 7, 2012 at 18:50

1 Answer 1

9

Subversion provides no means to undo a commit like Git does. Lately I learned, that using TortoiseSVN you can retroactively modify Subversion commit messages, but Subversion commits themselves are more or less final.

So what you need to to is a new commit which reverts your changes using git revert <commit_hash> and then a following git svn dcommit as you already pointed out in your comments.

Unfortunately this will not help to avoid conflicts in the modified files to others, even that these two commits in sum effectively do nothing.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.