Github - git undo merge commit another merge commit

De openkb
Aller à : Navigation, rechercher

Sommaire

Questions

I am a Git novice and totally messed up my remote master branch. I had a branch (add-comments-model) which I merged to master (and actually pushed it) and regret it. Now I would like to undo all these but the merge was done on command line instead.

My Git log of master looks like this:

111  Merge branch  add-comments-model 
222  Merge branch  master  into  add-comments-model 
333  Merge pull request #24 from good-merge
444  some commits from add-comments-model
.
.
666  some commits from add-comments-model

Ideally I hope to return to commit 333 ( a merge commit ) but i notice that the Merge branch master into add-comments-model must have caused some of the commits from add-comments-model to seep into the master branch log?

Can someone advise me on how to get my master branch back to commit 333?

Answers

Locally:
git reset --hard 333
git push --force origin master

Source

License : cc by-sa 3.0

http://stackoverflow.com/questions/26814181/git-undo-merge-commit-another-merge-commit

Related

Outils personnels
Espaces de noms

Variantes
Actions
Navigation
Outils