I use WSL almost exclusively, and only switch to main windows for browsing and running Windows native programs. I have a git repository located at /mnt/c/myrepo
. In order to "install" the code inside /mnt/c/myrepo
I need to move it to /mnt/c/otherlocation/renamed
. Instead of executing cp -r /mnt/c/myrepo /mnt/c/otherlocation/renamed
every time I do a git pull
from /mnt/c/myrepo
, I would like to symlink /mnt/c/myrepo
to /mnt/c/otherlocation/renamed
. However when I do this, the program which consumes /mnt/c/otherlocation/renamed
isn't able to view the "contents" of renamed as a directory.
I have been all over the WSL github repo and issue tracker trying to find a solution to this issue. I see a lot of exclamations about how symlinks "just work". I have enabled every Windows 10 developer feature I can find, I even followed some reddit thread where someone claimed that purchasing Pengwin and creating a symlink from Pengwin would ensure this compatibility, but I still can't seem to make this work.
The basic usage I need, is allow me to view "renamed" as a directory from windows, or for windows to recognize the symlink as a symlinked directory.
from wsl:
ln -s /mnt/c/myrepo /mnt/c/otherlocation/renamed
from windows:
- open file explorer
- navigate to c:\otherlocation
- open mydir and view the contents as if it were a native directory
How do I do this?
otherlocation
the command isln -s ../myrepo ./renamed
– Reeve