Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

Why am I getting fatal Invalid symlink .... Function not supported. error when initcloneing

Albert Armea edited this page Mar 31, 2015 · 2 revisions

This error occurs when git clone/init commands are run inside a Windows symlink target directory root and it's because of the incompatibility between how Windows and Unix symlinks work. There are three workarounds to fix this:

  • Run the command at the symlink source. For instance if you have a Windows symlink from C:\dir1 -> C:\dir2, the command will fail under C:\dir2 but will work under C:\dir1

  • Run the command one directory below the symlink target. Instead of C:\dir2, run it under C:\dir2\somedir

  • Use a directory junction instead. Create a directory junction with mklink /J ... ... instead of mklink /D ... .... Directory junctions are resolved at a lower level than symlinks, so Bash and Git see an actual directory instead of a symbolic link; however, it is not possible to create a directory junction that spans volumes.

Clone this wiki locally