title: How to revert multiple pull request merges all at once and preserve history
body: <p>I have a case where the Github repo master currently has a series of individual pull requests that have already been merged into master. I want to revert say the last 20 of those pull request merges but do it from the command line and preserve history. </p>
  
  <p>A similar question was marked as duplicate <a href="https://stackoverflow.com/questions/54119462/how-to-revert-multiple-merges-in-git">revert multiple merges</a></p>
  
  <p>However the answers given as already existing do not really deal with the specific question of what happens when everything you want to revert came from a series of pull requests which are all merges. Using the -m option with git revert is good for one merge at time right? So I think the answer is that there is not a good way (from the command line) to quickly revert a series of individual pull requests that have been merged and preserve history? Please correct me if I am wrong about this. If I have to do one at a time, I might as well just use the Github console and click on revert for each one. </p>