Git& GitHub - 提交拉取请求的分支太多

时间:2014-05-21 04:43:07

标签: git github pull-request

情况如下:我从原始回购(上游)获得了一个分叉。

所以根据GitHub的文档:https://help.github.com/articles/creating-a-pull-request,我们需要创建一个新的分支来处理一个特征,然后将它推送到我的Fork。然后使用Pull Request请求合并到原始仓库。

我理解。但是如果每个功能都需要一个分支,那么我的本地机器(以及我的分支机构)中将有一百/一千个临时分支。

我知道在我的Pull Request被接受之后,我可以将这些临时分支合并到我的Develop分支中,并删除分支。我做得对吗?这是使用Git和Pull Requests的正确流程吗?

1 个答案:

答案 0 :(得分:1)

这是推荐的工作流程(意味着将每个PR隔离在自己的分支中)。

指南“Tidying up Pull Requests”确实说明您只需点击一下即可删除PR分支 无需合并任何东西:一旦在主要上游仓库中合并,您的本地克隆应该从upstream/master更新master(上游是指向主仓库的远程名称,即您分叉的那个):见“ Pull new updates from original Github repository into forked Github repository”。
git push to the forked repo; pull request to a parent branch

的更多提示