Git 分支模型实现

标签 git

我试图了解如何实现描述的分支模型 here .

  1. 我的推断是否正确,在源上只有两个分支 - master 和development,而其他分支(如版本、功能和修补程序)仅在本地创建?或者所有这些都应该在起源中创建?
  2. 有人可以澄清一下这句话吗:

Each developer pulls and pushes to origin. But besides the centralized push-pull relationships, each developer may also pull changes from other peers to form sub teams...Technically, this means nothing more than that Alice has defined a Git remote, named bob, pointing to Bob’s repository, and vice versa

我特别困惑

Alice has defined a Git remote, named bob, pointing to Bob’s repository

她在哪里定义的?在服务器上还是本地?

最佳答案

  1. 所有这些都应该在原始版本中创建,因为任何时候您的同事可能想帮助您处理特定的分支。

  2. 如果您运行 git remote 命令,它将显示您的所有远程存储库。通常它只是那里的起源。但您可能想将其他人的存储库定义为您的远程存储库。有关远程存储库的更多详细信息 here

短语

Alice has defined a Git remote, named bob, pointing to Bob’s repository

意味着,如果 Alice 现在运行 git Remote,她将看到两个存储库:origin 和 bob。这是因为她之前添加了 bob 存储库作为另一个远程存储库。所以现在她可以在这个特定的存储库中共享她的提交。

关于Git 分支模型实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17826025/

相关文章:

git - 如何从 `commit-msg` git hook 中打开终端编辑器

git - 维护不同分支的补丁集

python - 没有文件更改数据的 merge 提交无法在数据框中显示

Git 使用 Heroku 将当前分支推送到远程

git - 需要了解 Git/Gerrit 命令(获取和推送)

git - git 分支引用中的 `..` 是什么意思?

git - Squash 提交基于消息

Gitlab 推送。您无权访问 master

Git 克隆和 npm 安装权限被拒绝(公钥)

linux - Git 分支和 ls