这是一个建议使用GitHub和团队的过程吗? [英] Is this a suggested process for using GitHub with a team?
问题描述
我首次从其他开发人员那里获得了我正在管理的回购协助,并且我想确保我理解工作流程应该如何实现。回购是在组织下设置的,而其他开发人员是具有读取权限的团队的成员。我拥有所有者权限。这就是我认为的工作流程:
- 他分叉回购
- 他创建了一个新分支
- 他进行了更改,添加了提交
- 他提交了一个请求
- 我将拉取请求合并到上游分支中
我是否在正确的轨道上?
是的,我们就是这么做的。 (他让分支在自己的分支上)。但是你缺少的是人们如何让自己的分支与主分支的主分支协调。
我们处理这个通过定期重新划分主上游分支的主人,并使用我们自己的存储库的主分支作为上游副本:
在我们自己的存储库的master上:
$ git fetch upstream
$ git rebase upstream / master
$ git push origin master
$ b定期在我们的分行:
$ git rebase master
我们也小心避免修改相同文件的相同行。
I am getting help from other developers for the first time on a repo that I am administrating, and I want to make sure I understand how the flow of work should go. The repo is setup under an Organization, and the other developers are members of a team with read access. I have owner access. Here is what I am thinking would be the flow of work:
- He forks the repo
- He creates a new branch
- He makes changes, adding commits
- He submits a pull request
- I merge the pull request into the upstream branch
Am I on the right track here?
解决方案Yes, that's how we do things. (He makes the branch on his own fork.) But what you're missing is how people keep their own branches coordinated with the main fork's master branch.
We handle this by regularly rebasing off the main "upstream" branch's master, and using our own repository's master branch as a copy of upstream's:
On our own repository's master:
$ git fetch upstream $ git rebase upstream/master $ git push origin master
Periodically, on our branches:
$ git rebase master
We're also careful to avoid changing the same lines of the same files.
这篇关于这是一个建议使用GitHub和团队的过程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!