Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I undo a git svn dcommit?

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?

like image 937
Adam Greenhall Avatar asked Aug 07 '12 17:08

Adam Greenhall


1 Answers

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.

like image 114
bentolor Avatar answered Sep 17 '22 22:09

bentolor