Git: committing a symlink to a folder

git

Solution

At least on my machine (Mac OS 10.7), the solution was to have the symlink actually point to some real content. In other words, the way the symlink was setup in the repository was that it was 'broken' (this was intentional: during the build process, that symlink would eventually become active in the final product). So I created a directory where the symlink was expecting it, was able to commit without an error, and then could delete that directory.

Problem

When adding to the index a symlink to a directory, I get the following error message: ``` fatal: pathspec 'XXX' did not match any files ``` The file is there, and it is indeed a symlink, even to a directory inside the repository in fact.

Original source