[英]Why my branch pending after merged in sourcetree graph
My problem is like this: I have a master branch. 我的问题是这样的:我有一个master分支。 To release a new version, I made some version related changes and commit the changes. 要发布新版本,我进行了一些与版本有关的更改并提交了更改。 I used to push directly, while now I realized that it is not a good idea. 我曾经直接推动,而现在我意识到这不是一个好主意。 So I checkout a new branch sfma_build. 所以我签出了一个新的分支sfma_build。 Then I push this local branch to remote repo, and pull request. 然后,我将此本地分支推送到远程仓库,并拉取请求。 After that, I merged the remote sfma_build into remote master. 之后,我将远程sfma_build合并到远程主服务器中。 Now in sourcetree, the graph looks like this: 现在在sourcetree中,图形如下所示:
While I think the graph should look like this: 虽然我认为该图应如下所示:
I mean, origin/sfma_build branch has already been merged to origin/master branch, right? 我的意思是,origin / sfma_build分支已经合并到origin / master分支,对吗? So there should be line segment connecting back to form a cycle? 那么应该有线段重新连接形成一个循环吗? That's what I see when other branches are merged. 这就是我合并其他分支时看到的内容。
We had this same issue until we changed our merge strategy on BitBucket. 在更改BitBucket上的合并策略之前,我们一直遇到同样的问题。 It's hard to tell from your cropped images, but in our case we changed to squash and merge
. 从裁切后的图像很难分辨出来,但是在我们的案例中,我们改为squash and merge
。 The merge commit is important because it has multiple parents, one to the branch you initiated the PR from and the other to the last commit in the branch you PR'ed to. 合并提交很重要,因为它有多个父级,一个是您发起PR的分支,另一个是您创建PR的分支中的最后一个提交。 You can use git log --parents
to see the difference between a merge commit with multiple parents and what the commit in your screenshot looks like. 您可以使用git log --parents
来查看具有多个父项的合并提交与屏幕快照中的提交之间的区别。
Based on this forum answer it looks like Bitbucket just recently added new merge strategies - https://answers.atlassian.com/questions/44341546/manual-squash-merge-detection-in-bitbucket-server-and-closing-pull-requests 基于此论坛回答它看起来像刚刚到位桶最近添加了新的合并策略- https://answers.atlassian.com/questions/44341546/manual-squash-merge-detection-in-bitbucket-server-and-closing-pull-要求
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.