Dura is a background service that snapshots uncommitted changes in watched Git repos on separate branches without touching HEAD or the index.
Overview
Dura runs as a background process that monitors Git repositories you register with dura watch. When you edit files—without committing or staging—it periodically records snapshots on special dura branches tied to your real commits, leaving HEAD, the current branch, and staged files unchanged.
If you lose work, you can inspect dura branches with git log or tig, pick a snapshot hash, and check out or restore files from that point. Recovery branches follow a dura/<commit> naming pattern derived from your latest commit. The watcher loops on an interval on the order of a few seconds between checks.
Start the service with dura serve, register repos one at a time from inside each repository, and stop it with dura kill. Installation paths include cargo install, platform packages, macOS launchctl setup, Windows builds, Arch Linux, and Nix flakes. Commits use libgit2 under the hood.
Key features
- Background serve process
- Per-repo watch registration
- Snapshots without affecting HEAD
- dura/* tracking branches
- Time-based recovery checkpoints
- libgit2-based commits
- cargo and package installs
- Nix flake development shell
Use cases
- Recovering uncommitted Git work
- Continuous repo-wide edit history
- Safety net while experimenting
- Rolling back hours of local changes