I\'m just entering into the wonderful world of git.
I have to submit a bunch of changes that I\'ve made on my program, located in a directory called /var/www/myapp
My scenario is that the git repository's path has symbolic link and git throw out this error when add file say to "/home/abc/GIT_REPO/my_dir/my_file". and "/home" is actually a softlink to "/devhome".
code ninja gave me some light when I tried to debug this case.
So I tried get the target directory by using the command readlink -f /home/abc/GIT_REPO
before run add command.
And then everything works like a charm !