This shows how to push and pull files between the Windows file system and the WSL2 file system.

The unrelated photo shows some integration composting we are doing at the Fernwood Road Cafe on Salt Spring Island.

The demo uses temporary directories for explanation.

# From within Windows PowerShell

 cd C:\tmp
 New-Item -type Directory goats-are-people-too
 cd .\goats-are-people-too\
 git init
 New-Item -type File
 git add -A
 git commit -m "Initial commit"

# From within WSL2 Ubuntu

cd /tmp/
git clone /mnt/c/tmp/goats-are-people-too
cd goats-are-people-too/

# Back within Windows PowerShell

cd C:\tmp\goats-are-people-too
git remote add origin \\wsl$\Ubuntu\tmp\goats-are-people-too

The repository in Windows at C:\tmp\goats-are-people-too can now push/pull from the repository in WSL2 at \tmp\goats-are-people-too. And it works both ways. Not only can Windows pull fromWSL2, but WSL2 call pull from Windows.