I have two folders:

  • /home/me/code/project/
  • /srv/www/projectfiles/

In the /home/me/code/project folder, I have symlinked static to /srv/www/projectfiles/

i.e. /home/me/code/project/static/ -> /srv/www/projectfiles/

When I try to commit now, it doesn't see any of the files behind the symlink, and instead tries to commit the symlink itself as a file.

How do I commit a file (e.g. /srv/www/projectfiles/style.css)s that is behind the symlink?

link|improve this question

feedback

2 Answers

up vote 2 down vote accepted

A workaround would be to have /srv/www/projectfiles be a symlink to /home/me/code/project/static so git sees no symlinks

link|improve this answer
feedback

Move the files into the folder and remove the symlink. Git doesn't traverse symlinks.

It (and I) would assume that you are symlinking to a set of files that you either don't control or don't want to modify, as such they don't need to be versioned.

link|improve this answer
I do control these files. They are the stylesheets etc. and need to be in a directory which the server will server. – Macha Aug 11 '10 at 19:13
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.