Delete a closed pull request from GitHub

后端 未结 3 723
刺人心
刺人心 2020-12-04 13:50

I accidentally made a wrong pull request and ended up closing the request myself. It\'s in a closed state right now but it\'s accessible via direct URL and showing on my act

相关标签:
3条回答
  • 2020-12-04 14:19

    This is the reply I received from Github when I asked them to delete a pull request:

    "Thanks for getting in touch! Pull requests can't be deleted through the UI at the moment and we'll only delete pull requests when they contain sensitive information like passwords or other credentials."

    0 讨论(0)
  • 2020-12-04 14:27

    5 step to do what you want if you made the pull request from a forked repository:

    1. reopen the pull request
    2. checkout to the branch which you made the pull request
    3. reset commit to the last master commit(that means remove all you new code)
    4. git push --force
    5. delete your forked repository which made the pull request

    And everything is done, good luck!

    0 讨论(0)
  • 2020-12-04 14:29

    There is no way you can delete a pull request yourself -- you and the repo owner (and all users with push access to it) can close it, but it will remain in the log. This is part of the philosophy of not denying/hiding what happened during development.

    However, if there are critical reasons for deleting it (this is mainly violation of Github Terms of Service), Github support staff will delete it for you.

    Whether or not they are willing to delete your PR for you is something you can easily ask them, just drop them an email at support@github.com

    UPDATE: Currently Github requires support requests to be created here: https://support.github.com/contact

    0 讨论(0)
提交回复
热议问题