0

found it out myself: git cherry-pick did the trick, simple cherry pick the wanted commit and the both modified status was regained so that I could merge again.

I did a commit with sha 51f1ee0e4ebebf551db20de1aa48badb0259c21b which was fine. I then pulled from master and a merge conflict happened and I commited the manual merge. I want to undo this. The following, manually merged commit is ad587bc7ac0d9d23ac77b5611537399bd581004c.

Basically I want to roll back to 51f1ee0e4ebebf551db20de1aa48badb0259c21b sothat a merge conflict happens again when I pull sothat I can re-auto merge things and push that.

The commit I want to pull/ merge from is eedea8c2fe7f0de9d9fe796bb9107a577f9dbb79

Alex
  • 9,911
  • 5
  • 33
  • 52
  • You can always use `git reset --hard ` to go to any different commit (older or newer), but I'm not sure I'm reading the question well enough to say that that's what you're looking for. –  Jan 21 '14 at 09:54
  • but when i pull the already commited merge is being pulled, but i want to pull so that a merge conflict happens again – Alex Jan 21 '14 at 09:56
  • You mean you pushed the commit corresponding to manual resolution an upstream repository already? If yes, and if you are the only one using that particluar upstream repository, then you can revert back by doing a forced push. – Anshul Goyal Jan 21 '14 at 10:04
  • So you didn't just merge, you also pushed the incorrect merge to the remote? –  Jan 21 '14 at 10:05
  • yep but i did it with cherry pick thanks :) – Alex Jan 21 '14 at 10:11

0 Answers0