When it comes to Mercurial;
What exactly is the difference between the following:
Google Search, SE search brings no clear examples / results on the matter.
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.
To remove all untracked files, you can use the purge extension and run hg purge .
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With