Mirror dirty files from a Windows Git repo into a matching WSL repo.
Project description
wdsync
wdsync is a WSL-side Python CLI for mirroring the dirty working tree of a
Windows Git repository into a matching WSL repository without requiring a
commit, push, or pull cycle.
It is built for the workflow where:
- your primary editing evn happens to be on Windows for whatever reason (Flutter, VSStudio, .Net Development, etc.)
- your backend, scripts, containers, or Linux tooling run in WSL either for prod or testing parity
- you want the WSL repo to mirror the current Windows dirty-set (staged and unstaged changes) on demand
The key design choice is that wdsync reads the source repo with git.exe, so
the sync set matches what Git for Windows considers dirty rather than what
Linux Git thinks about /mnt/c/....
What It Does
From inside a destination WSL repo, wdsync will:
- read a local
.wdsyncfile - resolve the Windows source repo from
SRC=/mnt/c/... - query the source dirty set using
git.exe(Windows Git) - preview by default to see the planned dirty set in the destination WSL repo
- sync when you run
wdsync syncorwdsync -f - warn with
wdsync doctorwhen source and destinationHEADdiffer or the destination repo is already dirty
Note: It includes: tracked unstaged files, tracked staged files, untracked files, including nested files in untracked directories It intentionally does not do these things in v1: delete propagation, patch-apply checks, staging/index mirroring, global config
Prerequisites
Gtt available in WSL and Windows (git.exe), rsync, wslpath, Python 3.11+, and uv; the source repo must be reachable as /mnt/<drive>/....
Install
- Read the detailed Setup guide here | Primary install path after a fresh clone or PyPI install:
uv tool install .
Per-Project Config
Each destination WSL repo gets a local .wdsync file at the repo root:
SRC=/mnt/c/Users/YourName/path/to/WindowsRepo
Example:
SRC=/mnt/c/Users/<User>/Documents/Projects/<ProjectName>
wdsync init writes this file for you and adds .wdsync to the destination
repo's .git/info/exclude so it stays local.
Quick Start
From inside the destination WSL repo:
wdsync init /mnt/c/Users/YourName/path/to/WindowsRepo
wdsync
wdsync sync
Compatibility alias:
wdsync -f
Doctor mode: Explain potential sync risks from source and destination state:
wdsync doctor
If you want to contribute or work on the codebase itself, use:
- DEVELOPER_SETUP for contributor environment setup
Additional references:
- CHANGELOG for release history
Project Layout
wdsync/
├── docs/
├── src/ [config, doctor, preview, shell, sync, sync, runner ...]
│ └── wdsync/
├── scripts/
│ ├── bash/
│ └── fish/
└── tests/
Commands
| Command | JSON Output | Purpose |
|---|---|---|
wdsync |
Yes, with wdsync --json |
Preview the current source dirty set. |
wdsync preview |
Yes, with wdsync preview --json |
Explicit preview mode. |
wdsync sync |
Yes, with wdsync sync --json |
Copy the planned dirty files into the current WSL repo. |
wdsync init <SRC> |
No | Create .wdsync for the current destination repo. |
wdsync doctor |
Yes, with wdsync doctor --json |
Show advisory sync-risk checks for source and destination state. |
wdsync shell install |
No | Install optional shell helpers and completions. |
Git Status Labels Passed
| [unstaged] [ M] | [staged] [M ] | [both] [MM] | [new] [??] | [added] [A ] | [added+mod] [AM] | [renamed] [R ] | [copied] [C ] | [deleted] [ D] | fallback [changed] |
Shell Integration
The CLI itself is shell-agnostic once installed. Optional shell helpers can be installed with:
wdsync shell install
Override shell detection when needed:
wdsync shell install --shell fish
wdsync shell install --shell bash
wdsync shell install --shell zsh
What shell install does:
- auto-detects
fish,bash, orzsh - installs completion assets
- installs a
wdsync-inithelper wrapper - installs fish function delegates when using fish
The scripts/ directory contains thin repo-local wrapper examples that
delegate to the installed CLI or fall back to uv run.
scripts/bash/contains executable shell wrappersscripts/fish/contains fish functions- the bash wrappers also work fine as standalone executable helpers from zsh
Important Behavior Notes
Source dirty-file detection comes from git.exe, not Linux Git. Preview shows
the full source dirty set rather than a destination diff, and sync copies file
contents only. A source staged file does not remain staged in the destination
repo. Deleted files are previewed but skipped in v1 so they never break
rsync, while renames and copies are parsed correctly from porcelain v1 -z
and untracked directories are expanded to leaf file paths.
Limitations
wdsync is WSL-only, supports one source path per destination repo, and
expects the source path to live under /mnt/<drive>/.... In v1 it does not
propagate deletes, run patch-apply checks, or support post-sync hooks.
See IN_DEVELOPMENT.md for the roadmap beyond the current Python CLI baseline.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wdsync-0.1.0.tar.gz.
File metadata
- Download URL: wdsync-0.1.0.tar.gz
- Upload date:
- Size: 70.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
742788b201671c2e697e9c668d699f86ed0053991c88017b56c6dcb4c747138d
|
|
| MD5 |
41060dc77a62f37951361a44f6ccc6ce
|
|
| BLAKE2b-256 |
8a4234e924f926acfdec2a07d7c1a908261b3fdcd2ec4b205e437e16f2ece381
|
File details
Details for the file wdsync-0.1.0-py3-none-any.whl.
File metadata
- Download URL: wdsync-0.1.0-py3-none-any.whl
- Upload date:
- Size: 30.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc777886ef4a7d3f5058412afaf440994203b8c70db30e2c04a8448193fc7712
|
|
| MD5 |
4a4cfc5638e56a6e359db596a54c375b
|
|
| BLAKE2b-256 |
626b79bd0a8cfe5fd48e41647b8144f60b4f0b0079ab537377b313ad7033ec8a
|