2010-06-28 6 views
1

Dans mon dépôt je suis arrivé 2 branche lors de l'utilisation git-svnRevert un commit fichier

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

Maintenant, je peux voir la diff

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

Comment puis-je revenir à la modification? Merci

Répondre

2

Essayez ceci:

# 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 
Questions connexes