A local branch:-
'feature/100'
And Remote branches:-
'master'
'Version2'
Accidently,
- I have merged my feature branch 'feature/100' to the master
- Also pushed it to the remote repository.
But in real 'feature/100' should have been merged into remote branch 'Version2'
How I fixed it (partially):-
i have merged the feature branch 'feature/100' to the remote branch 'Version2' and pushed it to the server.
git checkout Version2
git merge --squash feature/100
git add .
git commit -m 'New message'
But I want to delete the last push I have merged and commit to the master branch. How?
Side Note I am only one working on this project.. So even if pushed commit is deleted it won't harm anyone else
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…