[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-5855":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":29,"readmeContent":30,"aiSummary":31,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":32,"discoverSource":33},5855,"dura","tkellogg\u002Fdura","tkellogg","You shouldn't ever lose your work if you're using Git","",null,"Rust",4422,69,25,16,0,2,4,8,6,64.34,"Other",false,"master",true,[27,28],"git","rust","2026-06-12 04:00:27","# Dura\n\n[![Build][build badge]][build action]\n\nDura is a background process that watches your Git repositories and commits your uncommitted changes without impacting\nHEAD, the current branch, or the Git index (staged files). If you ever get into an \"oh snap!\" situation where you think\nyou just lost days of work, checkout a `dura` branch and recover.\n\nWithout `dura`, you use Ctrl-Z in your editor to get back to a good state. That's so 2021. Computers crash and Ctrl-Z\nonly works on files independently. Dura snapshots changes across the entire repository as-you-go, so you can revert to\n\"4 hours ago\" instead of \"hit Ctrl-Z like 40 times or whatever\". Finally, some sanity.\n\n## How to use\n\nRun it in the background:\n\n```bash\n$ dura serve &\n```\n\nThe `serve` can happen in any directory. The `&` is Unix shell syntax to run the process in the background, meaning that you can start\n`dura` and then keep using the same terminal window while `dura` keeps running. You could also run `dura serve` in a\nwindow that you keep open.\n\nLet `dura` know which repositories to watch:\n\n```bash\n$ cd some\u002Fgit\u002Frepo\n$ dura watch\n```\n\nRight now, you have to `cd` into each repo that you want to watch, one at a time.\n\nIf you have thoughts on how to do this better, share them [here](https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura\u002Fissues\u002F3). Until that's sorted, you can\nrun something like `find ~ -type d -name .git -prune | xargs -I= sh -c \"cd =\u002F..; dura watch\"` to get started on your existing repos.\n\nMake some changes. No need to commit or even stage them. Use any Git tool to see the `dura` branches:\n\n```bash\n$ git log --all\n```\n\n`dura` produces a branch for every real commit you make and makes commits to that branch without impacting your working\ncopy. You keep using Git exactly as you did before.\n\n\nLet `dura` know that it should stop running in the background with the `kill` command.\n\n```bash\n$ dura kill\n```\n\nThe `kill` can happen in any directory. It indicates to the `serve`\nprocess that it should exit if there is a `serve` process running.\n\n## How to recover\n\nThe `dura` branch that's tracking your current uncommitted changes looks like `dura\u002Ff4a88e5ea0f1f7492845f7021ae82db70f14c725`.\nIn $SHELL, you can get the branch name via:\n\n```bash\n$ echo \"dura\u002F$(git rev-parse HEAD)\"\n```\n\nUse `git log` or [`tig`](https:\u002F\u002Fjonas.github.io\u002Ftig\u002F) to figure out which commit you want to rollback to. Copy the hash\nand then run something like\n\n```bash\n# Or, if you don't trust dura yet, `git stash`\n$ git reset HEAD --hard\n# get the changes into your working directory\n$ git checkout $THE_HASH\n# last few commands reset HEAD back to master but with changes uncommitted\n$ git checkout -b temp-branch\n$ git reset master\n$ git checkout master\n$ git branch -D temp-branch\n```\n\nIf you're interested in improving this experience, [collaborate here](https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura\u002Fissues\u002F4).\n\n## Install\n\n### Cargo Install\n1. Install Cargo  \n2. If you want run release version, type ```cargo install dura``` else type ```cargo install --git https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura```\n\n### By Source\n\n1. Install Rust (e.g., `brew install rustup && brew install rust`)\n2. Clone this repository (e.g., `git clone https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura.git`)\n3. Navigate to repository base directory (`cd dura`)\n4. Run `cargo install --path .` **Note:** If you receive a failure fetching the cargo dependencies try using the local [git client for cargo fetches](https:\u002F\u002Fdoc.rust-lang.org\u002Fcargo\u002Freference\u002Fconfig.html#netgit-fetch-with-cli). `CARGO_NET_GIT_FETCH_WITH_CLI=true cargo install --path .`\n\n### Mac OS X\n\nThis installs `dura` and sets up a launchctl service to keep it running.\n\n```bash\n$ brew install dura\n```\n\n### Windows\n1. Download [rustup-init](https:\u002F\u002Fwww.rust-lang.org\u002Ftools\u002Finstall)\n2. Clone this repository (e.g., `git clone https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura.git`)\n3. Navigate to repository base directory (`cd dura`)\n4. Run `cargo install --path .` **Note:** If you receive a failure fetching the cargo dependencies try using the local [git client for cargo fetches](https:\u002F\u002Fdoc.rust-lang.org\u002Fcargo\u002Freference\u002Fconfig.html#netgit-fetch-with-cli). `CARGO_NET_GIT_FETCH_WITH_CLI=true cargo install --path .`\n\n### Arch Linux\n\n```bash\n$ paru -S dura-git\n```\n\n### Nix \u002F Nixos\n\n[Nix][nix website] is a tool that takes a unique approach to package\nmanagement and system configuration. NixOS is a Linux distribution\nbuilt on top of the Nix package manager.\n\nTo run `dura` locally using pre-compiled binaries:\n\n```bash\nnix shell nixpkgs#dura\n```\n\nIf you're willing to contribute and develop, `dura` also provides its\nown ready-to-use [Nix flake][nix flake].\n\nTo build and run the latest development version of `dura` locally:\n\n```bash\nnix run github:tkellogg\u002Fdura\n```\n\nTo run a development environment with the required tools\nto develop:\n\n```bash\nnix develop github:tkellogg\u002Fdura\n```\n\n## FAQ\n\n### Is this stable?\n\nYes. Lots of people have been using it since 2022-01-01 without issue. It uses [libgit2](https:\u002F\u002Flibgit2.org\u002F) to make the commits, so it's fairly battle hardened.\n\n### How often does this check for changes?\n\nEvery now and then, like 5 seconds or so. Internally there's a control loop that sleeps 5 seconds between iterations, so it\nruns less frequently than every 5 seconds (potentially a lot less frequently, if there's a lot of work to do).\n\n\nBrought to you by \u003Ca rel=\"nofollow me\" href=\"https:\u002F\u002Fhachyderm.io\u002F@kellogh\">Tim Kellogg\u003C\u002Fa>.\n\n\n[build badge]: https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura\u002Factions\u002Fworkflows\u002Fbuild.yaml\u002Fbadge.svg\n[build action]: https:\u002F\u002Fgithub.com\u002Ftkellogg\u002Fdura\u002Factions\u002Fworkflows\u002Fbuild.yaml\n[nix website]: https:\u002F\u002Fnixos.org\u002F\n[nix flake]: https:\u002F\u002Fnixos.wiki\u002Fwiki\u002FFlakes\n","Dura 是一个基于 Rust 的工具，旨在防止使用 Git 时丢失未提交的工作。它通过在后台监视你的 Git 仓库并自动提交未提交的更改来实现这一目标，而不会影响当前分支或 Git 索引。Dura 的核心功能包括自动保存和恢复功能，可以让你轻松地回滚到之前的状态，从而避免因意外情况导致的工作损失。该工具适用于任何需要频繁使用 Git 进行版本控制的开发场景，尤其是当开发者希望提高数据安全性和减少手动操作时。","2026-06-11 03:05:12","top_language"]