Guerrilla Guerrilla - 1 year ago 204
Git Question

How do I make Git ignore symlink?

I have symlinks in my project folder so that large directories of videos and images are accessible when I am running project in local dev server on my windows 10 machine.

The problem with this is that Git wont let me do "add ." because when symlinks are present it gives me this error:

error: readlink("ProjectName/SymlinkName"): Function not implemented
error: unable to index file ProjectName/SymlinkName
fatal: adding files failed

I have added the symlinks to the .gitignore but this didn't change anything.

I am cautious about making them hardlinks inside my dev project. Is this my only option?


My gitignore looke like this:


Answer Source

Git considers symlinks to be files, not directories. You need to remove the / at the end of each .gitignore line:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download