No Symlink Support?


I cant seem to get symlinks syned. The main repo folder is not a symlink however I have symlinks in the repo. Is this supportted ?


Symlinks are currently ignored (not followed, not synced).

calmh Thanks. for the answer. Are you planning to add symlink support at all?

There’s a github issue for it: I’m not sure what to do in all cases to avoid surprises and gnashing of teeth, especially with a mix of platforms.

Assuming we simply copy symlinks verbatim (which seems the most sane thing), what do we do on platforms that don’t support symlinks? We could copy the file the symlink points to, but that would be surprising if it was a file outside the synced directory on the source. We can also simply ignore it. In that case, what do we do when a file is created with that name on such a system and it needs to be copied back to the systems with a symlink - remove the symlink and replace it with a file, or overwrite the file the symlink pointed to? Does it depend on whether the symlink pointed to something inside or outside of the repo? What even happens today in that situation?

If there’s a clean solution to all corner cases I certainly won’t mind putting it in there. I’m not working on such a solution myself at the moment.


Unison deals with symlinks in couple ways which can be described in the config files. Not that we have to follow its way of doing things but it is a good start in my view

You can let Unison to either disregard(default, just copies the symlink as is, not on win), you can tell Unison (via patterns)which symlinks should be followed.

In my opinion symlinks should be considered real citizens meaning that a symlinked folder in a sync folder is a folder to follow, therefor ST can just safely copy the sym folder (with the content) to the other side. This seems to be the most logical and most usage case to me. If the other side supports symlinks, the user can deal with it on the other node. It is up to the user. So ST could sync the content of the symlink(s) both ways.

Copying the symlink as symlink sounds like the most troublesome way due to different platforms in my personal opinion.

Finally ignoring symlinks is probably the safest thing to do but symlinks offer great usability(double edged sword naturally)

I can see following symlinks on the source and creating regular files/directories on the destination being relatively easy to implement. But going by the commentary in the ticket, that doesn’t seem to be what people want from “supporting symlinks”. And what people want doesn’t seem to work sanely in a cross platform environment, as far as I can tell.


Only time copying symlink as symlink makes sense when the symlinks points out another folder within the sync folder(so we avoid circular situation). Other than that I say provide a setting to let us either ignore or follow maybe? Obviously it would be nice if you can provide us settings for all possibilities of symlinks however I realize it is a sticky situation between cross platform files.

Sorry for coming in late, but I definitely think that it makes sense to sync symlinks to regular files/folders in the remote repo as long as they do not point to within the same repo. I would really like such an option!