8

When it comes to Mercurial;

What exactly is the difference between the following:

  • Stop Tracking
  • Ignore

Google Search, SE search brings no clear examples / results on the matter.

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
Phil
  • 13,875
  • 21
  • 81
  • 126
  • If this is about TortoiseHG or another GUI for Mercurial, please tag it as such. Otherwise, it isn't clear which commands you are referring to... – Adam Jan 02 '13 at 21:17
  • @codesparkle, it's already been tagged though. The GUI in question is: source tree (Atlassian) – Phil Jan 03 '13 at 00:36
  • Sorry, I hadn't realized that was the name of the product. Thanks for the clarification. – Adam Jan 03 '13 at 16:43
  • @codesparkle, not at all. I should be the one thanking for your simple, clear answer. – Phil Jan 03 '13 at 18:34

1 Answers1

13

Generally speaking, as it isn't clear in what context you came across those terms:

  • Ignore adds a file name pattern to the .hgignore file. It means any files matching the pattern will not be version controlled unless they have already been added (by hg add or hg addrem). So any files that are already part of the repository will not be affected by .hgignore.

  • Stop Tracking (hg remove or hg forget) means that Mercurial will not record any changes made to the file and the file will no longer be part of the repository. If the file is still present in the file system, it will show up as ? (not tracked). This action takes effect with the next commit, not immediately.

Community
  • 1
  • 1
Adam
  • 15,537
  • 2
  • 42
  • 63
  • So is it possible to ignore after stop-tracking a file currently part of the repository? Thank you. – Phil Jan 03 '13 at 00:37
  • Yes. You can either add the file name to `.hgignore` manually or (probably) through Atlassian source tree. – Adam Jan 03 '13 at 16:47