What is the correct way to handle symlinks in git?
I have the following structure:
Vendors
Module A
Module B
Module C
App
Code
Modules
Cor
Git stores the symlink, just like any other file in its version control - except for a symlink it would only store the information about the path it is symlinking to, and the file type as symlink instead of a regular file.
If the symlink points to a directory, git does not store the contents under the symlinked directory.
So there should be no harm in storing symlinks versioned under git for your case.
One more thing you need to be aware of with symlinks is that, git would only recreate the symlinks on a fresh clone, not the file or directory it is pointing at. There are chances that the symlinked path would be non-existent (say when using absolute paths).