tags:

views:

31

answers:

1

Hi,

In my repository I got 2 branch when using git-svn

$ git branch -a
* master
  remotes/git-svn

Now I can see the diff with

$ git diff --name-status remotes/git-svn
M       global/library/Exception.php

How can I revert the modification? Thanks

+1  A: 

Try this:

# create new branch (just in case you have some modifications in master branch)
git checkout -b revert_wrong_commit
# svn switch
git reset --hard git-svn
# undo last commit (takes the patch from the commit and unapplies it)
git revert HEAD
# commit the reverted changes
git commit -a
# switch to master branch
git checkout master
# merge the changes from revert_wrong_commit branch
git merge revert_wrong_commit
d.m