What is the difference between hg forget and hg remove?

前端 未结 5 828
南旧
南旧 2020-11-28 01:52

I want mercurial to remove several files from the current state of the repository. However, I want the files to exist in prior history.

How do forget an

5条回答
  •  臣服心动
    2020-11-28 02:21

    'hg forget' is just shorthand for 'hg remove -Af'. From the 'hg remove' help:

    ...and -Af can be used to remove files from the next revision without deleting them from the working directory.

    Bottom line: 'remove' deletes the file from your working copy on disk (unless you uses -Af) and 'forget' doesn't.

提交回复
热议问题