A local branch:-
- ‘feature/100’
And Remote branches:-
- ‘master’
- ‘Version2’
Accidently, I have merged my feature branch ‘feature/100‘ to the master and also pushed it to the remote repository.
Whereas the feature branch ‘feature/100‘ should have been merged into remote branch ‘Version2‘.
How should i fix it?
Use
git revert -m1 <commit id of the merge>. Where1is a parent number of the merge (so that which of the merge parents should be reverted). I assume it is1by default, but it rarely could be2.More info: http://git-scm.com/2010/03/02/undoing-merges.html