Question

I am trying to get git to ignore a symlink, but it remains as "untracked" (even though the real link is ignored in the origin). I have seen two posts regarding, this, but the answers seem to be "don't add them" but I have to have them because it is the only way I can show images on my testing server without having to have duplicates.

And I can't just leave them as untracked, because there is the potential to add them, and when I accidentally added a symlink, it destroyed my originals (luckily, I was backed up).

The links I've found that are of no help:

git is NOT ignoring a symlink

Git and symlinks

Thanks for any help!

Was it helpful?

Solution

Try this:

$ find * -type l -not -exec grep -q "^{}$" .gitignore \; -print >> .gitignore

Found it from:

https://magento.stackexchange.com/questions/4641/how-to-git-ignore-symlinks-on-a-magento-module-installed-by-composer

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top