{"id":13998276,"url":"https://github.com/ethomson/git-recover","last_synced_at":"2025-04-04T06:06:49.387Z","repository":{"id":21851482,"uuid":"91731626","full_name":"ethomson/git-recover","owner":"ethomson","description":"It's like undelete for your git repository.","archived":false,"fork":false,"pushed_at":"2025-01-29T13:07:44.000Z","size":22,"stargazers_count":228,"open_issues_count":3,"forks_count":27,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-28T05:09:33.984Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethomson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["ethomson"]}},"created_at":"2017-05-18T19:45:24.000Z","updated_at":"2025-02-17T15:20:47.000Z","dependencies_parsed_at":"2022-07-16T18:17:01.420Z","dependency_job_id":null,"html_url":"https://github.com/ethomson/git-recover","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fgit-recover","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fgit-recover/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fgit-recover/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethomson%2Fgit-recover/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethomson","download_url":"https://codeload.github.com/ethomson/git-recover/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247128744,"owners_count":20888235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-09T19:01:31.818Z","updated_at":"2025-04-04T06:06:49.365Z","avatar_url":"https://github.com/ethomson.png","language":"Shell","funding_links":["https://github.com/sponsors/ethomson"],"categories":["Shell"],"sub_categories":[],"readme":"git-recover: recover deleted files in your repository\n===========\n\n[![CI](https://github.com/ethomson/git-recover/workflows/CI/badge.svg)](https://github.com/ethomson/git-recover/actions?query=workflow%3ACI)\n\n`git-recover` allows you to recover some files that you've accidentally deleted\nfrom your working directory.  It helps you find files that exist in the\nrepository's object database - because you ran `git add` - but were never\ncommitted.\n\nGetting Started\n---------------\n\nThe simplest way to use `git-recover` is in interactive mode - simply run\n`git-recover -i` and it will show you all the files that you can recover\nand prompt you to act.\n\nUsing git-recover\n-----------------\n\nRunning `git-recover` without any arguments will list all the files (git\n\"blobs\") that were recently orphaned, by their ID.  (Their filename is not \nknown.)\n\nYou can examine these blobs by running `git show \u003cobjectid\u003e`.  If you\nfind one that you want to recover, you can provide the ID as the argument\nto `git-recover`.  You can specify the `--filename` option to write the\nfile out and apply any filters that are set up in the repository.  For\nexample:\n\n    git-recover 38762cf7f55934b34d179ae6a4c80cadccbb7f0a --filename shattered.pdf\n\nYou can also specify multiple files to recover, each with an optional output\nfilename:\n\n    git-recover 38762c --filename one.txt cafebae --filename bae.txt\n\nIf you want to recover _all_ the orphaned blobs in your repository, run\n`git-recover --all`.  This will write all the orphaned files to the current\nworking directory, so it's best to run this inside a temporary directory\nbeneath your working directory.  For example:\n\n    mkdir _tmp \u0026\u0026 cd _tmp \u0026\u0026 git-recover --all\n\nBy default, `git-recover` limits itself to recently created orphaned blobs.\nIf you want to see _all_ orphaned files that have been created in your\nrepository (but haven't yet been garbage collected), you can run:\n\n    git-recover --full\n\nOptions\n-------\n    git-recover [-a] [-i] [--full] [\u003cid\u003e [-f \u003cfilename\u003e] ...]\n\n`-a`, `--all`  \nWrite all orphaned blobs to the current working directory.  Each file will\nbe named using its 40 character object ID.\n\n`-i`, `--interactive`  \nDisplay information about each orphaned blob and prompt to recover it.\n\n`--full`  \nList or recover all orphaned blobs, even those that are in packfiles.  By \ndefault, `git-recover` will only look at loose object files, which limits\nit to the most recently created files.  Examining packfiles may be slow,\nespecially in large repositories.\n\n`\u003cid\u003e`  \nThe object ID (or its abbreviation) to recover.  The file will be written to\nthe current working directory and named using its 40 character object ID,\nunless the `-f` option is specified.\n\n`-f \u003cfilename\u003e`, `--filename \u003cfilename\u003e`  \nWhen specified after an object ID, the file written will use this filename.\nIn addition, any filters (for example: CRLF conversion or Git-LFS) will be\nrun according to the `gitattributes` configuration.\n\nGetting Help and Contributing\n-----------------------------\nTo report bugs, get assistance or provide a bug fix to this program,\ncheck it out on [GitHub](https://github.com/ethomson/git-recover/).\n\nCopyright (c) [Edward Thomson](http://edwardthomson.com/).  All rights reserved.\n\ngit-recover is open source software and is available under the MIT license.\nPlease see the included `LICENSE` file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fgit-recover","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethomson%2Fgit-recover","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethomson%2Fgit-recover/lists"}