1

Since I'm working on Windows, once download repository, all symbolic links in repo turn into unavailable files.

I want to get hard-copied files instead of symbolic links which are not recognizable on Windows. It doesn't matter to preserve history.

When a git repository contains lots of symbolic links, how can I get properly dereferenced files when downloading them?

slyx
  • 2,063
  • 1
  • 19
  • 28
  • 2
    Possible duplicate of [Git Symlinks in Windows](https://stackoverflow.com/questions/5917249/git-symlinks-in-windows) – Ray May 06 '18 at 08:43

2 Answers2

2

If you're on Windows 10, you can enable developer mode to support symbolic links from Linux, BSD, and other flavors of Unix: https://blogs.windows.com/buildingapps/2016/12/02/symlinks-windows-10/

Is this adequate to solve your issue? If not, your best option is to write a script to locate all the links, and assuming they point to files in the repo (not Linux specific files like /usr/bin/cd) replace them locally with the actual files. Note, you'll not what to check these in.

Ray
  • 40,256
  • 21
  • 101
  • 138
1

Windows Git handles symlinks by itself. With an option -c core.symlinks=true, Windows Git can create windows symbolic links.

Here's more detail: https://github.com/git-for-windows/git/wiki/Symbolic-Links

slyx
  • 2,063
  • 1
  • 19
  • 28