理解GitHub上的pull请求:当请求的存储库被删除时会发生什么? [英] Understanding pull requests on GitHub: What happens, when the requesting repository is deleted?
问题描述
以下情形:
我将一个开源库(> GitHub - >项目 - > Fork
)。然后,我克隆了本地项目副本,在主分支中进行了一些更改,并提交给了我的存储库:
$ git clone git@github.com-myusername:myusername / originalprojectname.git
... changes ...
$ cd originalprojectname
$ git add path / to / changed / file.php
$ git commit -m...
$ push
之后我在GitHub上启动了一个pull请求。它已被标记为很好融合并被添加到里程碑:xyz
。
更改的代码在哪里住在哪里?只有在我的回购或其他东西?背景是:我想删除我的存储库。所以,最后我的问题是:如果我在GitHub上删除了我的存储库,那么对于原始项目,这些更改仍然可用,还是应该等待发布 xyz
?< 在删除回购后,代码仍然存在。只要你提交你的pull-request,Github会在内部把这个分支添加到目标repo中(它在非默认命名空间中创建一个分支,所以你通常不会看到这些分支)。
由于PR通常不会被删除,因此这些分支将无限期地存在于目标回购库中。
回答您的其他问题:代码将驻留在两个你的叉子和目标回购(最起码,除非你删除你的叉子)。
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
?
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).
这篇关于理解GitHub上的pull请求:当请求的存储库被删除时会发生什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!