在 Bitbucket、Branches 和标签中同步分叉……它们是如何同步的?
Syncing a fork in Bitbucket, Branches and tags..how are they synced?
我对整个分叉相当陌生"thingy"..我了解了这个概念的基础知识,但我没有了解的部分是:所有分支会发生什么?
假设我决定分叉一个存储库;原始存储库添加了一堆新分支,我假设我的叉子不会自动更新。然后,如果我决定将我的分支与原始分支同步,这会覆盖原始分支上新创建的分支吗?或者只要我在 fork-repo 中没有一个名为相同东西的分支,它们就会保持完整吗?标签也一样吗?
不,您只参加了 a copy of the repository。如果您没有明确地做到这一点,那么您复刻中的任何分支或标签都不会进入存储库的上游副本。
What happens to all the branches?
一旦您将它们“发布”(git push
) 到服务器,所有分支都位于您的服务器上(在您的例子中是 bitbucket)。
Lets say that I decide to fork a repository.. then the original repository adds a bunch of new branches (which I assume my fork won't get updated with automatically).
你说得对,它们不会自动更新。
Then I decide to sync my fork with the original..
will this overwrite the newly created branches on the original?
不,为了获得最新更新,您必须 pull
来自原始存储库的更改。因为 pull 是 fetch + merge
你不会“丢失”你的代码。它将合并在一起。
但是
除非您是此存储库的贡献者,否则您不能将代码发布到原始存储库。您有读取权限但没有写入权限。
我对整个分叉相当陌生"thingy"..我了解了这个概念的基础知识,但我没有了解的部分是:所有分支会发生什么?
假设我决定分叉一个存储库;原始存储库添加了一堆新分支,我假设我的叉子不会自动更新。然后,如果我决定将我的分支与原始分支同步,这会覆盖原始分支上新创建的分支吗?或者只要我在 fork-repo 中没有一个名为相同东西的分支,它们就会保持完整吗?标签也一样吗?
不,您只参加了 a copy of the repository。如果您没有明确地做到这一点,那么您复刻中的任何分支或标签都不会进入存储库的上游副本。
What happens to all the branches?
一旦您将它们“发布”(git push
) 到服务器,所有分支都位于您的服务器上(在您的例子中是 bitbucket)。
Lets say that I decide to fork a repository.. then the original repository adds a bunch of new branches (which I assume my fork won't get updated with automatically).
你说得对,它们不会自动更新。
Then I decide to sync my fork with the original..
will this overwrite the newly created branches on the original?
不,为了获得最新更新,您必须 pull
来自原始存储库的更改。因为 pull 是 fetch + merge
你不会“丢失”你的代码。它将合并在一起。
但是
除非您是此存储库的贡献者,否则您不能将代码发布到原始存储库。您有读取权限但没有写入权限。