bitbucket 集中式工作流程和 fork 同步

bitbucket centralized work flow and fork syncing

Q1。 Bitbucket 具有 fork 的同步功能。当我同步时,这是否意味着我的回购正在同步并与我根据每个分支的名称从每个分支分叉的上游回购合并在一起?因此,这实际上是 git 获取并合并 每个分支及其匹配的分支名称 如果我在本地有分支并决定同步。

Q2。上游 repo 有一个 master 和一个 develop 分支。 develop 分支拉入请求并合并它们,并与 master 分支进行比较并合并到 master。这个在 master 分支中创建的合并提交不应该出现在 develop 分支中,对吗?假设 develop 分支处理所有也是从 develop 分支创建的拉取请求,而不是从 master 合并。每个人的开发分支都应该清除 'master-merges-develop' 提交?

关于Q1,the documentation明确:

What gets synced?

When performing automatic synchronization, Bitbucket Server updates the fork as follows:

  • for branches - Bitbucket Server makes any fast-forward change, where there is no need to merge work and there is no risk of losing changes.
  • for tags - Bitbucket Server makes updates only if the current state is the same as what upstream pointed to. So, a new tag in upstream will create a new tag in the fork, unless you have a tag of the same name, when the update will fail.

Manual syncing

If upstream and your fork have diverged, so that each has changes that are not in the other, Bitbucket Server will not perform a merge automatically. When you visit the branch in Bitbucket Server, you have the option to manually synchronize the branch.

You can manually synchronize your branch at any time using Synchronize by going to the Settings > Fork syncing tab for the forked repository, or on either of the Source or Commits tabs for a repository:

对于第二季度,如果合并总是从开发到主控完成,那么主控中的合并提交实际上永远不会在开发中。