How to PR and merge again after reverting PR using Github Revert Button

Basically I used Github revert button to revert a previous PR for a feature branch into master, then I decided to merge the same feature branch that I reverted earlier, but I was not able to do so. Steps as follow:

  1. PR to merge feature branch to master
  2. Revert PR merge from (master)
  3. Tried to create new PR to merge feature branch to master again.
  4. Got this message:

There isn’t anything to compare.

  • npm install command doing nothing
  • Installing Git-TFS without Git itself
  • What are the various branches in a github “project page” cloned repository?
  • Does a git repo always have to be in its own directory
  • How to list all the tags, on a remote, that reference a commit or one of its descendants?
  • How do I restart a python script running inside of a screen using a bash script?
  • master is up to date with all commits from feature-branch. Try switching the base for your comparison.

    Any suggestions on how can I merge feature branch again into master

  • How to maintain repositories into a single repository
  • git in a web development team using 1 remote dev server and no local dev environment
  • Finding large files in the history of a git repository fails
  • To use <git push> on Visual Studio Code, but show “Could not read from remote repository.”
  • Visual studio 2013 github sync error 403
  • Execute commands from .bat file on Git Bash Terminal
  • 2 Solutions collect form web for “How to PR and merge again after reverting PR using Github Revert Button”

    Just revert the revert. So by clicking the revert button you will have created a new PR (your step 2). Once this is merged, you will have the option to revert this, which will create a new branch with all your changes back in. You can then pull this, make changes to it (if needed) and create a new PR. You will lose all the commit messages on Github, but all file changes will still be around. Good to refer to your original branch and reverts in the new PR.

    Anything to avoid a complicated rebase or force pushing to master.

    The reason you can’t auto merge back in is because the base of the branch is out of sync with the HEAD of the master branch.

    Reverting the Revert can get messy and sometimes lacks transparency.

    Furthermore, reverting a revert will prevent other branches with this code from merging correctly.

    Lets say you have feature x on master and merged into branch y. then you decide master shouldn’t have had feature x merged in yet as it depends on branch y. So, you revert on master. When you try to merge branch x, git-merge command sees the original merge, and happily announces that all is well and branches have been already merged, omitting these commit for feature x, even though you wanted them merged with branch y.

    You should pull the most recent master, rebase your branch on master and then you should be able to make another pull request.

    Git Baby is a git and github fan, let's start git clone.