Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial Stop Tracking and Ignore

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.

like image 865
Phil Avatar asked Jan 02 '13 21:01

Phil


People also ask

How do I ignore an already tracked file in git?

Use Git update-index to ignore changes To resume tracking, run the git update-index command with the --no-skip-worktree flag. Or, you can temporarily stop tracking a file and have Git ignore changes to the file by using the git update-index command with the assume-unchanged flag.

How do I remove untracked files from Mercurial?

To remove all untracked files, you can use the purge extension and run hg purge .

How do I turn off track changes in git?

Just calling git rm --cached on each of the files you want to remove from revision control should be fine. As long as your local ignore patterns are correct you won't see these files included in the output of git status. This is to tell git you want your own independent version of the file or folder.

What does stop tracking do in Sourcetree?

It only removes it from source control. If you want to keep the file locally (maybe it's a . suo file storing Visual Studio settings that you decide shouldn't have been in source control) but remove it from the repository, you should use Stop Tracking.


1 Answers

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.

like image 190
Adam Avatar answered Sep 29 '22 20:09

Adam