Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Use git svn to roll back some changes on the svn server?

Tags:

git

svn

git-svn

If I use git svn dcommit to commit a change, and then make a few changes and call git svn dcommit again, what is the simplest way to roll back the changes to the first version. If I were working only locally, then git reset --hard HEAD^ would be fine, but I need this to work on the svn server.

like image 883
jonderry Avatar asked Mar 16 '11 00:03

jonderry


1 Answers

Use git revert to make a new git commit that un-does the earlier change. Then git-svn dcommit that to the svn server. You would not use your git reset solution if you had pushed to a remote git repo either: It would confuse everyone who had pulled the intermediate revision that had your change.

like image 81
Ben Jackson Avatar answered Oct 05 '22 05:10

Ben Jackson