我怎么能确定BitBucket会合并(与网站按钮)?

时间:2016-01-24 16:13:58

标签: git workflow bitbucket git-merge

让Alice和Bob在同一个BitBucket git存储库上工作。 Alice拥有管理员权限,而Bob有限制在master分支上写入。因此,每次Bob想要贡献时,他都会创建一个特殊的分支,提交它,然后执行Pull Request。

Alice更喜欢GUI,而Bob可以使用命令行。

问题:Bob可以确定Alice能够从BitBucket网站GUI按钮进行合并的方式是什么?

P.S。或许这种情况还有其他工作流程?当Alice应该控制对master分支的所有更改,并且通过按钮接受Pull Requests。

1 个答案:

答案 0 :(得分:0)

what way Bob can be sure that Alice would be able to do a merge from BitBucket website GUI button?

Bob has to make sure his branch is based on the latest version of master, in order for a pull request to result in a trivial fast-forward merge of his branch into master.

So before pushing, always rebasing on top of master:

git fetch
git rebase origin/master
git push --force

(Since Bob is the only one working on his branch, changing the history won't be an issue, and force pushing is fine: the pull request, if created before, will adjust to the new history of that branch)