This repository has been archived by the owner. 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.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.