I have a symbolic link to a folder in one of the subfolders in my git repo called base
. I have already tracked and uploaded this symbolic link (which is treated as a file in git2) to my repo, which is why even when I adjust my .gitignore to include this folder, it still tracks it. To fix this you normally run git rm --cached <file-name>
1.
I've gone to the directory that base
is in and have tried:
git rm --cached base
However, I get:
fatal: pathspec 'base' did not match any files
I've also tried this and get the same error:
git rm --cached ./base
It is a symbolic link so no trailing / necessary, however it does not work.
My question is, how do I remove a symbolic link from being tracked in git?
[1] How to make Git "forget" about a file that was tracked but is now in .gitignore? [2] How do I make Git ignore symlink?