Skip to main content
deleted 27 characters in body
Source Link
philwalk
  • 684
  • 1
  • 7
  • 18

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib, so it's not possible to clone using the cygwin or msys2 version of git.

From a WSL2 Ubuntu bash session, I was able to clone it into my C:\Users\username\workspaces folder.

cd /mnt/c/Users/username/workspace/

git clone https://github.com/com-lihaoyi/os-lib.git

cd os-lib/

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To restore file permissions:

git config --unset --localrestore core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib, so it's not possible to clone using the cygwin or msys2 version of git.

From a WSL2 Ubuntu bash session, I was able to clone it into my C:\Users\username\workspaces folder.

cd /mnt/c/Users/username/workspace/

git clone https://github.com/com-lihaoyi/os-lib.git

cd os-lib/

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To restore file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib, so it's not possible to clone using the cygwin or msys2 version of git.

From a WSL2 Ubuntu bash session, I was able to clone it into my C:\Users\username\workspaces folder.

cd /mnt/c/Users/username/workspace/

git clone https://github.com/com-lihaoyi/os-lib.git

cd os-lib/

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To restore file permissions:

git restore .

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
added 388 characters in body
Source Link
philwalk
  • 684
  • 1
  • 7
  • 18

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib, so it's not possible to clone using the cygwin or msys2 version of git.

To clone it into my HOME directory workspaces folder, I did the following fromFrom a WSL2 Ubuntu bash session:, I was able to clone it into my C:\Users\username\workspaces folder.

cd /mnt/c/Users/username/workspace/ 

git clone https://github.com/com-lihaoyi/os-lib.git 

cd os-lib/

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To undo modifiedrestore file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib.

To clone it into my HOME directory workspaces folder, I did the following from a WSL2 Ubuntu bash session:

cd /mnt/c/Users/username/workspace/
git clone https://github.com/com-lihaoyi/os-lib.git
cd os-lib

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To undo modified file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib, so it's not possible to clone using the cygwin or msys2 version of git.

From a WSL2 Ubuntu bash session, I was able to clone it into my C:\Users\username\workspaces folder.

cd /mnt/c/Users/username/workspace/ 

git clone https://github.com/com-lihaoyi/os-lib.git 

cd os-lib/

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To restore file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
added 388 characters in body
Source Link
philwalk
  • 684
  • 1
  • 7
  • 18

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can PAINLESSLYeasily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib.

To clone it into my HOME directory workspaces folder, I did the following from a WSL2 Ubuntu bash session:

cd /mnt/c/Users/username/workspace/
git clone https://github.com/com-lihaoyi/os-lib.git
cd os-lib

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To undo modified file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can PAINLESSLY clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib.

To clone it into my HOME directory workspaces folder, I did the following from a WSL2 Ubuntu bash session:

cd /mnt/c/Users/username/workspace/
git clone https://github.com/com-lihaoyi/os-lib.git
cd os-lib

From a cygwin or msys2 session:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

If you have WSL2 installed (if not, see @Peeter Joot's answer) , you can easily clone a project with symlinks into a Windows directory.

To be explicit, the following project has 4 symlinks below the os/test/resources directory, 2 of which are broken by design: com-lihaoyi/os-lib.

To clone it into my HOME directory workspaces folder, I did the following from a WSL2 Ubuntu bash session:

cd /mnt/c/Users/username/workspace/
git clone https://github.com/com-lihaoyi/os-lib.git
cd os-lib

From a cygwin or msys2 session, you can verify that the symlinks are as expected:

# verify symlinks:
ls -ltrad $(find os/test/resources -type l)

lrwxrwxrwx 1 username None 13 Jun 10 10:55 os/test/resources/test/misc/broken-abs-symlink -> /doesnt/exist
lrwxrwxrwx 1 username None  6 Jun 10 10:55 os/test/resources/test/misc/broken-symlink -> broken
lrwxrwxrwx 1 username None 11 Jun 10 10:55 os/test/resources/test/misc/file-symlink -> ../File.txt
lrwxrwxrwx 1 username None 10 Jun 10 10:55 os/test/resources/test/misc/folder-symlink -> ../folder1

As a side-effect, when I did git diff from cygwin, some file permissions had been changed from 644 to 744.

To undo modified file permissions:

git config --unset --local core.fileMode

Finally:

$ git status
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
Source Link
philwalk
  • 684
  • 1
  • 7
  • 18
Loading