从变更集中排除文件?
可能的重复:
使用 Mercurial ,提交和推送单个文件同时保留其他修改的最简单方法是什么?
使用 Mercurial 签入单个文件?
我对 2 个文件进行了更改。一个有错误修复,另一个有一堆临时调试代码,我想暂时保留在工作目录中但不想提交。
使用 git,我只会将第一个文件添加到变更集中,如何使用 Mercurial 最简单地做到这一点?
Possible Duplicate:
Using mercurial, what's the easiest way to commit and push a single file while leaving other modifications alone?
Check in single file with Mercurial?
I made changes to 2 files. One has a bug fix, the other has a bunch of temporary debugging code that I want to keep in my working directory for now but do not want to commit.
With git I would only add the first file to the changeset, how do I easiest do this with mercurial?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你能不能简单地提交你想要的一个文件:
或者,你可以使用
-X
选项来排除另一个文件:因为你只有 2 个文件,一个应该提交,一个应该提交不应该,无论哪种方式都没有真正的区别。
有关详细信息,请参阅文档。
Can you not simply commit the one file that you do want:
Alternatively, you could use the
-X
option to exlude the other file:Since you only have 2 files, one which should be commited and one which should not, it doesn't really make a difference either way.
See the documentation for more information.
只需使用
您可能还会发现记录扩展很有趣:它让您仅提交部分< /em> 文件中所做的更改。
Just use
You might also find the record extension interesting: it let's you commit only part of the changes made in a file.