How clean up merged git branches can delete pull requests?

∥☆過路亽.° 提交于 2021-01-29 10:26:17

问题


I was about to follow the instructions to delete all branches on remote that are already merged:

git branch -r --merged | grep -v master | sed 's/origin\//:/' 
| xargs -n 1 git push origin 

from How can I delete all Git branches which have been merged?

But noticed WARNING: This command will delete and close open pull requests. – Diego Aug 14 '17 at 15:19

As I understand , git branch -r --merged will return only branches, not pull requests. Is a warning about the scenario when source or target branch of pull request has been merged to master and therefore deleted by the command? it will make such pull request invalid and has to be closed.
Or some other scenarios are effected?

As pull requests are not a core feature of git, they are supported by different Git hosting services. Does the deletion of pull requests effect all hosts or only some, such as GitHub?

Is any way to avoid closing open pull requests when clean up merged git branches?

来源:https://stackoverflow.com/questions/65444886/how-clean-up-merged-git-branches-can-delete-pull-requests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!