Delete a closed pull request from GitHub

后端 未结 3 728
刺人心
刺人心 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: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!

提交回复
热议问题