Ela*_*ich 10 version-control mercurial
很多时候我对我的存储库中的文件进行了两次不同的更改,我希望将这些更改视为两次连续提交.
例如,在存储库中
虽然修复bug prog.c
和prog.h
我固定在一个错字README.txt
.现在我想将更改提交给prog.c
自己的提交消息,然后更改为README.txt
.
在git中,我可以轻松地使用索引来做到这一点
git add prog.c prog.h
git commit -m 'bug #1234'
git commit README.txt -m 'some typos fixed'
Run Code Online (Sandbox Code Playgroud)
在Mercurial中,最好的方法是什么?
澄清:我使用(在编辑之前)一个玩具示例,其中每个变更集跨越单个文件.但我想要一般的答案,当每个变更集中有许多文件时,我该怎么办?
Jer*_*ome 19
hg commit -m "bug #1234" prog.c prog.h
Run Code Online (Sandbox Code Playgroud)
然后
hg commit -m "some typos fixed" README.txt
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4396 次 |
最近记录: |