Skip to content

Instantly share code, notes, and snippets.

@guille-moe
Forked from robertpainsi/README.md
Last active April 19, 2018 11:14
Show Gist options
  • Save guille-moe/cd41fdbc8969b15428a50af2543a5cfa to your computer and use it in GitHub Desktop.
Save guille-moe/cd41fdbc8969b15428a50af2543a5cfa to your computer and use it in GitHub Desktop.
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Get your latest commit hash of your branch (LAST-HASH): git log --oneline -1 <PR-BRANCH>
  2. Get the latest commit hash before the PR has been closed on github (CLOSE-HASH).
  3. git push -f origin <CLOSE-HASH>:<PR-BRANCH>
  4. Reopen the PR.
  5. git push -f origin <LAST-HASH>:<PR-BRANCH>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment