How to make Git ignore a symlink?

I have symbolic links in the project folder, so large catalogs of videos and images are available when I run the project on a local dev server on a Windows 10 machine.

The problem with this is that Git will not let me 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 added symbolic links to .gitignore, but that didn't change anything.

I am careful to make them hard links inside my dev project. Is this my only option?

Edit:

My gitignore looks like this:

NameOfSymlink/
AnotherSymlink/
+4
source share
1 answer

Git , . / .gitignore:

NameOfSymlink
AnotherSymlink
+13

Source: https://habr.com/ru/post/1660035/


All Articles