Reputation: 694
If a Pull request is merged (say PR3) and on top of that couple of more Pull requests (say PR4, PR5 etc.) have been merged that made changes to the same file in the previously merged Pull request PR3, Now I want to revert the Pull request PR3 and Git is not allowing me to do that automatically and giving this error.
Sorry, this pull request couldn't be reverted automatically. It may already have been reverted, or the content may have changed since it was merged.
How Should I revert pull request PR3?
Upvotes: 6
Views: 6698
Reputation: 1236
Let's say then that you can create a new branch with all the content.
Then in your main branch you start doing reverses.
$ git revert --no-commit PR5
$ git revert --no-commit PR4
$ git revert --no-commit PR3
$ git commit -m "NO PRS"
Then in your new branch you save whatever you need. And merge with your main branch.
Upvotes: 2