git - "Fork & Pull"工作流与 Git 的 "Forking"工作流相比

标签 git github

有人可以向我解释一下使用 Git 时“Fork & Pull”工作流程和“Forking”工作流程之间的区别吗?在我看来,这两者都涉及创建您自己的存储库,然后使用 pull 请求请求中央存储库获取您的更改?我已经多次阅读这两者的描述,但我并不清楚它们最终有何不同。

最佳答案

来自“Atlassian: Forking Workflow

The Forking Workflow is fundamentally different than other popular Git workflows.

如果实际上是pull request模型(由GitHub发起and their fork):每个开发者push到自己的fork repo,并从fork repo向main repo发起pull request,maintainer可以在其中挑选什么整合。

这与经典的 Git 工作流程不同,在经典的 Git 工作流程中,所有开发人员都将推送到相同远程仓库,但在不同的分支中,并使用不同的 merge 工作流程(如 gitworkflow ).

所以:

is the described workflow the same as what others call "Fork and Pull"?

不:这是 GitHub 模型的另一个名称,您在其中 fork 一个存储库,从该 fork 中 pull ,创建一个您推回(到您的 fork )的新分支,并发出 pull 请求。

GitHub contrasts that使用共享存储库模型,协作者被授予对单个共享存储库的推送访问权限,并在需要进行更改时创建主题分支。

Pull requests are useful in this model as they initiate code review and general discussion about a set of changes before the changes are merged into the main development branch.

关于git - "Fork & Pull"工作流与 Git 的 "Forking"工作流相比,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55249168/

相关文章:

php - 将 SQL 上传到公共(public) git 存储库是否安全并建议?

使用 GIT_SSH 时 git ls-remote 挂起

python - 作为开发的一部分,我致力于 github 并在其他地方执行。感觉不对

android - 如何将 GreenDroid 添加到现有的 Android Studio 项目中?

github - 在多个 Github 存储库中搜索

Git - 无法获取/pull/克隆

Git merge 请求序列

git - 由于特殊字符 "Ã",无法删除 GIT 标签

git - 对于 Jenkins git 插件,建议在哪里运行 `git config` ?

windows - 在命令行上使用 git 时是否可以使用 intellij 作为我的编辑器?