DEV Community

Cover image for I built the VS Code Remote WSL extension, but for GitHub Desktop
araguard
araguard

Posted on

I built the VS Code Remote WSL extension, but for GitHub Desktop

If you use GitHub Desktop with repos stored in WSL, you know the pain. Every operation takes 10-30 seconds. Switching branches? 30 seconds. Fetching? 10 seconds. Even git status on a tiny repo takes 40ms+ because Desktop runs git.exe on Windows, which accesses WSL files through the 9P protocol — every file stat is a round-trip across the VM boundary.

Meanwhile, VS Code solved this years ago with the Remote WSL extension. It runs a server inside WSL and talks to it over a socket. Fast, native, no 9P overhead.

I wanted the same thing for GitHub Desktop. So I built it.

What it does

GithubDesktopWSL is a fork of GitHub Desktop that runs a lightweight daemon inside WSL. The daemon handles git commands and file operations natively over TCP. Desktop connects to it instead of going through 9P.

Official Desktop (slow):
  Desktop -> git.exe -> 9P -> VM boundary -> WSL -> ext4

This fork (fast):
  Desktop -> TCP -> daemon -> git (native) -> ext4
Enter fullscreen mode Exit fullscreen mode

The daemon is bundled in the installer. When you open a WSL repo, it deploys and starts automatically. There's nothing to configure.

Performance

Operation Fork Official Speedup
git status 2 ms 43 ms 20x
git log 2 ms 41 ms 24x
Open repo 16 ms 173 ms 11x
git rev-parse 2 ms 41 ms 27x

The ~40ms floor in official Desktop is the cost of launching git.exe through 9P. The daemon has ~2ms overhead (TCP round-trip + message framing). The actual git work is the same.

How it works

Three components:

wsl-git-daemon (C, ~550 lines) — persistent daemon inside WSL. Listens on localhost TCP, handles git commands and file operations (read, write, stat, unlink). Token-based auth.

wsl.ts (TypeScript, ~490 lines) — Desktop-side client. Detects WSL paths, manages daemon lifecycle (deploy, start, restart), implements the binary protocol, provides drop-in wrappers for fs operations.

core.ts patch (1 if-block) — all git commands in Desktop flow through one function. A single if (isWSLPath(path)) routes WSL repos through the daemon. Windows repos are completely untouched.

What else it fixes

Beyond performance:

  • SSH keys just work — daemon runs in WSL natively, so ~/.ssh/ keys are accessible. No more SSH_ASKPASS issues.
  • No CRLF problems — git runs in Linux, line endings stay as they should.
  • File operations work — diffs, merge state, .gitignore reads/writes all go through the daemon.
  • Repo deletion works — handles WSL UNC paths that Windows Recycle Bin can't.

Staying current

It's patch-based — 6 patch files applied on top of upstream releases via git apply. CI checks for new upstream releases every 6 hours, applies patches, builds, and publishes automatically. So it stays current with official Desktop features.

Installs side-by-side with official Desktop. You can keep both.

Try it

Download the installer from the releases page, run it, open a WSL repo. That's it.

Would love feedback, especially if you hit any issues with specific WSL distros or repo setups.

GitHub logo aleixrodriala / GithubDesktopWSL

GitHub Desktop with native WSL support — 6-27x faster git operations

GitHub Desktop WSL

Think of it like the VS Code Remote WSL extension but for GitHub Desktop. A fork of GitHub Desktop that makes WSL repositories work properly — 6-27x faster git operations, working SSH keys, and no more CRLF issues.

Download the latest release — installs side-by-side with official GitHub Desktop

The problem

Official GitHub Desktop can't handle repos inside WSL. When you open a \\wsl.localhost\... path:

  • Git commands are unusably slow — Desktop runs Windows git.exe, which accesses WSL files through the 9P protocol. Every file stat, read, and open is a round-trip across the VM boundary.
  • SSH keys don't work — Desktop injects a Windows-only SSH_ASKPASS binary that breaks SSH inside WSL.
  • File operations fail — Checking merge/rebase state, reading diffs, writing .gitignore — all go through 9P and are either slow or broken.
  • Deleting repos fails — Windows Recycle Bin doesn't support WSL…




Top comments (0)