开发者

Remove all deleted files in next commit with Mercurial

Let's say I have the current status:

M File1.cs
M File2.cs
M File3.cs
! File4.cs
! File5.cs
! File6.cs

How do I bulk remove files 4, 5, 6 (!) from the next commit?

At the moment, I am just removing them manually before committing, like such:

hg remove File4.cs
hg remove File5.cs
hg remove File6.cs

But is there a way to remove 开发者_如何学JAVAthem all at one go ?


Run hg addremove


hg remove --after

...is probably better (doesn't add files)

This is taken straight from the comment by tonfa in the accepted answer. I'm adding it because it was never added as a separate Answer.


Or just

hg addr

:) it is shortcut from

hg addremove


try the hg help system

hg help

and you will get the command in the beginning:

list of commands:
  add           add the specified files on the next commit
  addremove     add all new files, delete all missing files
  ...

so you can use

hg addremove
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜