对于这样的工作流程,
$hg clone <bitbucket repo>
... fix, fix ...
$hg commit -m "good comment!"
$hg bookmark stable
...new fix on stable...
$hg commit -m "new fix on stable bookmark"
$hg bookmark experimental --> I would like to defer merging until its stable.
... hack hack more hack ....
$hg commit -m "more hack on experimental"
$created new head
$hg push <bitbucket repo>
"abort: push creates new remote heads!"
(did you forget to merge? use push -f to force)
我读过很多书说“永远不要使用 push -f 强制”。
但是,是的,实验头需要被推动,因为我不想在它足够稳定之前合并。我也不想在我的机器上保留这个书签上的更改太久(如果系统崩溃了会发生什么?),我想拉这个书签并在以后继续实验。不过,它是一种“集中式”方法。处理这种情况的最佳方法是什么?有没有办法使用书签来处理这个工作流程?不想使用命名分支。
注意:我只使用了“push -f”,但 Bitbucket 从未在存储库“标签”链接上显示此书签。