GitHub - 合并拉取请求(与壁球提交) - 分支仍然说在主人之前提交7个提交? [英] GitHub - Merge Pull Request (with Squash Commits) - branch still says 7 commits ahead of master?
问题描述
在我自己的仓库中,我已经在设置>中将
,这样我自己的 master
分支设置为 protected
分支 Pull Requests
不会被自动接受。这使我可以在接受我自己的 Pull Request
时选择 Squash Commits
的选项。
问题是,在合并之后,如果我在GitHub上转到 Branches
,合并的分支仍然显示<强大> 7在主人之前提交。我怎么才能得到更新?
更新
我不认为有一种解决方法。我将使用壁球&合并
,删除分支
,并在上创建
与合并分支的名称标记
master
合并与squash不会被git跟踪,所以该分支仍然显示为未被合并。你应该记得哪些分支被合并。据我了解,这个想法是,只要您合并它们,就可以删除分支。
On my own repository, I have set master
branch as protected
in Settings>Branches
so that my own Pull Requests
won't be auto accepted. This allows me to then choose the option to Squash Commits
when accepting my own Pull Request
.
The problem is that after this merge, if I go go Branches
on GitHub, the merged branch still shows 7 commits ahead of master. How can I get update this?
Update
I don't think there is a way around this. I am going to use Squash & Merge
, delete the branch
, and create a tag
on master
with the name of the merged branch
Merge with squash is not tracked by git, so the branch is still shown as unmerged. You should somehow remember which branches are merged. As far as I understand, the idea is that you remove the branches as soon as you merge them.
这篇关于GitHub - 合并拉取请求(与壁球提交) - 分支仍然说在主人之前提交7个提交?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!