开发者

Check in single file with Mercurial?

开发者 https://www.devze.com 2023-01-01 13:34 出处:网络
Let\'s say you do hg status and you have three files modified.I know how to check in all three files (hg commit).But how can you check in (and then hg push) just o开发者_Python百科ne of the modified f

Let's say you do hg status and you have three files modified. I know how to check in all three files (hg commit). But how can you check in (and then hg push) just o开发者_Python百科ne of the modified files?


Please check the output of hg help commit which reveals that you can do

hg commit foo.c

if you just want to commit a single file. This is just like Subversion and many other systems — no hocus-pocus :-)


Just do:

hg ci -I path/to/file -m "commited only one file"

That commits only one file, and you can push it, and none of the uncommitted changes will be affected.


On the off chance you're running on Windows, TortoiseHG (a graphical Mercurial interface) lets you select which files to commit every time.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号