1
villivateur 2022-05-12 11:20:28 +08:00
直接贴:
https://stackoverflow.com/questions/18318097/delete-a-closed-pull-request-from-github > 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 [email protected] UPDATE: Currently Github requires support requests to be created here: https://support.github.com/contact 也就是说,除非你违反 Github 规则,或者严重侵犯你的权益,才可以联系 Github 删除 |
2
Immortan 2022-05-12 11:28:04 +08:00
你那个 pull request 对应的分支删掉就好了吧。或者把新提交 force push 掉。
|
3
coolair OP |
4
stevenshuang 2022-05-12 12:24:21 +08:00 via iPhone
直接通过新的分支提交不可以吗?通过新分支提 PR
|
5
learningman 2022-05-12 12:46:06 +08:00 via Android
你不删 fork ,force push 可解,现在的话没救了
|
6
SoloCompany 2022-05-12 12:58:33 +08:00 via iPhone
找到旧的 commit ,force push 上去,然后删除分支或 fork
|
7
KouShuiYu 2022-05-12 13:55:43 +08:00
保留现在的代码,检出之前的代码,然后复制粘贴
|
8
coolair OP @SoloCompany 已经不行了,旧的仓库已经删了。
|
9
paopjian 2022-05-12 16:03:41 +08:00
没看懂,是代码泄密了吗?
|
10
AmberMmoe 2022-05-12 20:10:05 +08:00
@SoloCompany push 了人家如果不给合呢
|
11
SoloCompany 2022-05-12 20:47:41 +08:00
如果 fork 的 repo 或分支已经删除了就不可恢复了, force push 的目的是恢复 PR 状态, 至于上游是否 accept 那是另一个无法控制的事情, 先恢复分支再删除 (而不是已经添加了很多新 commit 的状态) 的好处就是再次打开 PR (可能因为删除分支或 repo 已经自动关闭了) 查看的时候, 能看到正确的 commit
|
12
lonewolfakela 2022-05-13 11:49:32 +08:00
如果真的有啥敏感信息的话应该可以直接投诉吧……
|
13
ysc3839 2022-05-13 20:39:05 +08:00 via Android
冷知识:GitHub 的 pull request 请求的是一整个分支,所以后续对该分支的操作都属于 pull request 。有错误的 commit 也可以用 force push 覆盖掉,不需要重新开新的 pull request 。
|