How to permanently stop tracking a file/folder

Also note I’ve read Deleting a DVC tracked file from history but the recommended

dvc gc --workspace

Had no affect, i.e. it reported

WARNING: This will remove all cache except items used in the workspace of the current repo.
Are you sure you want to proceed? [y/n]: y
No unused ‘repo’ cache to remove.
No unused ‘local’ cache to remove.

Also it doesn’t seem to be a solution, I have a global cache, and I’m working in a branch.