Skip to content

Instantly share code, notes, and snippets.

@eoussama
Created April 30, 2026 08:51
Show Gist options
  • Select an option

  • Save eoussama/9f1ced9b77263e964fb000fede861b63 to your computer and use it in GitHub Desktop.

Select an option

Save eoussama/9f1ced9b77263e964fb000fede861b63 to your computer and use it in GitHub Desktop.
Access Git outside of WSL2 instance.
@echo off
wsl.exe -d Ubuntu --cd "%CD%" GIT_DISCOVERY_ACROSS_FILESYSTEM=1 git %*
@eoussama
Copy link
Copy Markdown
Author

  1. Create a .bin folder in your home directory.
  2. Expose this directory to your path.
  3. Place this executable there.
  4. Access WSL2 installed Git through wslgit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment