在Git我可以这样做:
1. Start working on new feature:
$ git co -b newfeature-123 # (a local feature development branch)
do a few commits (M, N, O)
master A---B---C
\
newfeature-123 M---N---O
2. Pull new changes from upstream master:
$ git pull
(master updated with ff-commits)
master A---B---C---D---E---F
\
newfeature-123 M---N---O
3. Rebase off master so that my new feature
can be developed against the latest upstream changes:
(from newfeature-123)
$ git rebase master
master A---B---C---D---E---F
\
newfeature-123 M---N---O
我想知道如何在Mercurial中做同样的事情,我已经在网上搜索了答案,但我能找到的最好的是:git rebase …
在过去的几天里,我一直在考虑与Git进行变革.反驳的大多数论据都说它清理历史并使其更加线性.如果您进行简单合并(例如),您将获得一个历史记录,显示历史记录何时分歧以及何时将其重新组合在一起.据我所知,rebasing删除了所有历史记录.问题是:为什么你不希望回购历史反映代码开发的所有方式,包括它在哪里以及如何分歧?