{"id":15421238,"url":"https://github.com/notwoods/backup-your-code","last_synced_at":"2026-05-18T06:06:11.546Z","repository":{"id":76026751,"uuid":"110086550","full_name":"NotWoods/backup-your-code","owner":"NotWoods","description":"Scan a directory for projects not backed up to a git remote.","archived":false,"fork":false,"pushed_at":"2018-09-30T04:15:42.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T04:24:20.764Z","etag":null,"topics":["backup","git","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/NotWoods.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-11-09T08:15:16.000Z","updated_at":"2018-09-30T04:15:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"88e10bf2-4968-4cea-92af-b0e7cf21a6ab","html_url":"https://github.com/NotWoods/backup-your-code","commit_stats":{"total_commits":5,"total_committers":1,"mean_commits":5.0,"dds":0.0,"last_synced_commit":"23a75fe1a129ff213c344f109721eb020eb0aaa8"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NotWoods/backup-your-code","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fbackup-your-code","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fbackup-your-code/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fbackup-your-code/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fbackup-your-code/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NotWoods","download_url":"https://codeload.github.com/NotWoods/backup-your-code/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NotWoods%2Fbackup-your-code/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273543189,"owners_count":25124276,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["backup","git","python"],"created_at":"2024-10-01T17:34:03.417Z","updated_at":"2026-05-18T06:06:06.504Z","avatar_url":"https://github.com/NotWoods.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# backup-your-code\n\nFind project folders that aren't backed up to a git remote. Great to make\nsure that everything is backed up before your computer crashes!\n\nBased on the input glob `pattern`, find folders and filter it to\nonly folders with one of:\n\n- No git repository\n- No git remote\n- Code not pushed to a remote\n\nIf no pattern is supplied, every git repository in the current working directory is searched.\n\nAvaliable as both a function and as a command line tool!\n\n## Usage\n\n### Command line\n\n```\nusage: python backup_your_code.py [-h] [--pattern PATTERN] [--cwd CWD]\n\noptional arguments:\n  -h, --help         show this help message and exit\n  --pattern PATTERN  glob pattern to find git repository folders\n  --cwd CWD          directory to start searching from\n```\n\n### Module\n\n`backup_your_code.py` is a single Python file with no dependencies (except that git should be installed on the computer).\n\nThe main export is the `backup_your_code` function, which yields tuples of `Path` objects and an enum.\n\n```python\ndef backup_your_code(pattern: str = None, cwd: str = os.path.curdir) -\u003e Iterable[NotBackedUp]\n```\n\nIf git is not installed, a `GitNotInstalledError` is raised.\n\nThe yieled tuples are defined as a named tuple:\n\n```python\nNotBackedUp = namedtuple('NotBackedUp', ['path', 'reason'])\nNotBackedUpReason = Enum('NotBackedUpReason', 'NO_REMOTE NOT_COMMITTED NOT_PUSHED')\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotwoods%2Fbackup-your-code","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnotwoods%2Fbackup-your-code","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnotwoods%2Fbackup-your-code/lists"}