假设我同时创建了两个类次 :
hg branch branch-A
hg branch branch-B
如何将我的下一次提交发送到 branch-A 而不是 branch-B ?
最佳答案
hg branch X
做 什么都不做 除了告诉 Mercurial“我的下一次提交应该在分支 X 上”。它实际上并没有“创建”分支。分支在至少有一次提交之前不存在:
sjl at ecgtheow in ~/Desktop/test on default at tip
$ hg branch a
marked working directory as branch a
sjl at ecgtheow in ~/Desktop/test on a at tip
$ hg branch b
marked working directory as branch b
sjl at ecgtheow in ~/Desktop/test on b at tip
$ hg branches
default 0:aae011bc1b00
sjl at ecgtheow in ~/Desktop/test on b at tip
$ echo foo >> x
sjl at ecgtheow in ~/Desktop/test on b at tip!
$ hg com -m1
sjl at ecgtheow in ~/Desktop/test on b at tip
$ hg branches
b 1:b66106035d8d
default 0:aae011bc1b00 (inactive)
sjl at ecgtheow in ~/Desktop/test on b at tip
$
所以你的问题的答案是:“使用
hg branch branch-A
将下一个提交标记为在分支 A 上。”关于mercurial - 定义我的下一次提交添加到哪个分支,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1453048/