Reputation: 6128
Is there a way to make git completely ignore symlinks (leave them in the tree, but not create them on checkout)? Alternatively, is there a way to make git convert between symlinks on linux and shortcuts on windows?
Context: I'm using git with some LaTeX files on both windows and linux. On linux, I have a large number of style files stored outside the repo, and symlinked to from a bunch of places. It'll work fine if git turns them into shortcuts on windows (I have the same surrounding directory/file structure), or if git ignores them completely, and doesn't check them out (I have the style files in my LaTeX distribution on windows).
Upvotes: 13
Views: 9219
Reputation: 1323115
On the "ignoring symlink" side, you could set the config core.symlinks
configuration variable to false
(as a local config within the Windows Git repo):
Symlinks would be checked out as small plain text files that contain the path of the file system object that it links to, but without creating said target object.
Upvotes: 6