What is the difference between hg forget and hg remove?

前端 未结 5 819
南旧
南旧 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:29

    The best way to put is that hg forget is identical to hg remove except that it leaves the files behind in your working copy. The files are left behind as untracked files and can now optionally be ignored with a pattern in .hgignore.

    In other words, I cannot tell if you used hg forget or hg remove when I pull from you. A file that you ran hg forget on will be deleted when I update to that changeset — just as if you had used hg remove instead.

提交回复
热议问题