Any way to force TortoiseGit (or any other Git software) to treat Symbolic Links (in Windows) as real files?

Posted on

QUESTION :

  • OS: Win10

In Windows (by most Git software, however, I’d like to emphasize on TortoiseGit) Hard Symbolic Link is treated as regular file. However, Soft Symlinks are being ignored – Git software can’t version the file content or detect changes.

Is there any way, that Soft Symlinks were also treated same way ? I have marked checkbox (during Git-Scm installation) to enable symlink support, but it doesn’t address soft-symlinks as I see.

ANSWER :

First, a note on terminology. A symbolic link is equivalent to a soft link; a hard link is separate and is not considered to be a type of symbolic link.

The problem you’re having is that while you’ve enabled symlinks for Git, Windows chose to make working with symbolic links require elevated privileges by default. As such, you’ll need to either adjust the permissions on your repository, or, in Windows 10, enable Developer Mode and reboot so that you can create symbolic links. Once you’ve done that, you can set git config core.symlinks true (git config --global to adjust it globally) and then check out a new revision, and if you’ve enabled Developer Mode, any future repositories you clone or create should support symbolic links properly.

Leave a Reply

Your email address will not be published.