0

I have a git repo that is used to build a custom live-boot image (debian-live based). I modify the repo on my Windows machine, but pull it to a Linux build server to actually build the image. Some of the files are symlinks, pointing to other locations on the build server (well, actually in chroot during build - these are files provided with debian-live). So, I don't need these files to be symlinks in Windows, I just need them to have the "120000" file type in git. I cloned the repo to start work on a similar live-boot image, but the symlink file types weren't preserved. They have the same hash and contents, just a different git type. How do I change them??

Andy P
  • 1
  • If you are using Windows 10 I would recommend to install and use Windows Subsystem for Linux (WSL) for cloning the git repo. – Robert Feb 25 '19 at 11:59
  • 1
    At what point did you determine that they have a "different git type"? ie, what command did you run that you noticed this? Are they different in the index? Or only in the working tree? – Edward Thomson Feb 25 '19 at 12:01
  • 1
    The second answer here might help you: https://stackoverflow.com/questions/5917249/git-symlinks-in-windows – joanis Feb 25 '19 at 12:19
  • Just to clarify - I have this setup working, my problem is cloning it. @EdwardThomson If I run "git ls-tree HEAD" in the folder containing the relevant files, the original repo shows "120000 blob . My new, cloned repo shows "100644 blob ". – Andy P Feb 25 '19 at 12:45
  • Could you paste the actual commands beginning with the clone and ending with the ls-tree HEAD? This is unexpected and I fear that something is very wrong - those modes are part of the tree and thus part of the commit (and thus make up the commit ID). So it would be either ls-tree misreporting a tree or something else odd going on... – Edward Thomson Feb 25 '19 at 13:56
  • I used the TortoiseGit GUI to create the repo. Now I think of it, I think I created the new repo after just copying + pasting the contents of the original one into a new folder. This would explain the discrepancy, but is there a way to recreate those symlinks? – Andy P Feb 25 '19 at 14:38

0 Answers0