Understanding pull requests on GitHub: What happens, when the requesting repository is deleted?

北战南征 提交于 2019-12-30 04:01:07

问题


Following scenario:

I forked an open source repository (GitHub -> project -> Fork). Then I cloned my project copy locally, made some changes in the master branch, commited them, and pushed to my repository:

$ git clone git@github.com-myusername:myusername/originalprojectname.git
... changes ...
$ cd originalprojectname
$ git add path/to/changed/file.php
$ git commit -m "..."
$ push

After it I started a pull request on GitHub. It has been marked as "Good to merge" and added to Milestone: x.y.z.

Where is the changed code staying? Only in my repo or also something else? The backgroud is: I would like to delete my repository. So, finally my question: If I delete my repository on GitHub, are the changes still available then for the original project or should I wait for the release x.y.z?


回答1:


Yes, the code will still be there after you delete your repo. As soon as you submit your pull-request, Github internally adds that branch to the target repo (it creates a branch in a non-default namespace, so you usually don't see those).

Since PRs cannot usually be deleted, those branches will exist in the target repo indefinitely.

To answer your other question: The code will reside in both your fork and the target repo (originally, at least, unless you delete your fork).



来源:https://stackoverflow.com/questions/16080544/understanding-pull-requests-on-github-what-happens-when-the-requesting-reposit

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