{"id":27334853,"url":"https://github.com/dmuth/save-and-restore-development-directory","last_synced_at":"2025-10-06T00:33:38.978Z","repository":{"id":138471118,"uuid":"207435140","full_name":"dmuth/save-and-restore-development-directory","owner":"dmuth","description":"Some scripts I wrote to save and restore my development directory on a new machine","archived":false,"fork":false,"pushed_at":"2024-05-15T02:42:40.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-12T14:51:24.221Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmuth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2019-09-10T01:07:24.000Z","updated_at":"2024-05-15T02:42:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"5f63a7b2-69e5-4a68-9383-c2b7e14982e0","html_url":"https://github.com/dmuth/save-and-restore-development-directory","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dmuth/save-and-restore-development-directory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fsave-and-restore-development-directory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fsave-and-restore-development-directory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fsave-and-restore-development-directory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fsave-and-restore-development-directory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmuth","download_url":"https://codeload.github.com/dmuth/save-and-restore-development-directory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmuth%2Fsave-and-restore-development-directory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542654,"owners_count":26004060,"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-10-05T02:00:06.059Z","response_time":54,"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":[],"created_at":"2025-04-12T14:46:29.026Z","updated_at":"2025-10-06T00:33:38.932Z","avatar_url":"https://github.com/dmuth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Save and Restore Your Development Directory\n\nIf you're like me, you have many projects under a directory called `development/`.\nYou may even have some nested directories for related projects.  As an example,\nhere's a fraction of my development directory:\n\n```\n./allaboutcheetahs.info/\n./diceware/\n./docker/check-disk-space/\n./docker/health-check/\n./node/circuitbreaker-demo/\n./node/neural-network/\n./s3/bucket-sizes/\n./s3/disk-usage/\n./snowdrift/\n./ssh-to/\n```\n\nEach of those projects is something that is checked out from GitHub.\n\nWhile I do back up my machine with Time Machine, I wanted additional\noptions, especially in the scenario where I'm not restoring a machine, but\ninstead *moving* to a new machine.\n\nSo I wrote these scripts.  They're relatively straightforward.\n\n\n## Saving Your Development Directory\n\nRun the `save.sh` script as follows:\n\n`bash \u003c(curl -s https://raw.githubusercontent.com/dmuth/save-and-restore-development-directory/master/save.sh) path/to/development/directory repos.txt`\n\nThis will go through your development directory, find every Git repo, \nand write the directory path (relative to the path given above)\nand the `origin` Git resource it uses.\n\n\n## Restoring Your Development Directory\n\nRun the `restore.sh` script as follows:\n\n`bash \u003c(curl -s https://raw.githubusercontent.com/dmuth/save-and-restore-development-directory/master/restore.sh) repos.txt path/to/new/directory`\n\nThat will go through the file with directories and repos, and clone each \nof them the target directory, mirroring the directory structure\nof the old development directory.\n\n\n## FAQ\n\n### Q: What if there are multiple remotes on a repo?\n\nA: These scripts do not address this.\n\n\n### Q: What if a clone in `restore.sh` fails because I didn't have `ssh-agent` set up, etc.?\n\nA: Then the script will stop.\n\n\n### Q: What if a repo's directory exists due to a previously aborted run of `restore.sh`?\n\nA: If a repo's directory exists, it will be sanity checked to make sure the repo is sane, and then skipped.\n\n\n## Contact\n\n- \u003ca href=\"https://twitter.com/dmuth\"\u003e@dmuth\u003c/a\u003e on Twitter\n- \u003ca href=\"https://facebook.com/dmuth\"\u003eDouglas Muth\u003c/a\u003e on Facebook\n- Email: doug.muth AT gmail DOT com\n- ...or just file an issue on this project!\n\nYou can also \u003ca href=\"https://www.dmuth.org/saving-and-restoring-your-development-directory/\"\u003eread about these scripts on my blog\u003c/a\u003e...\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fsave-and-restore-development-directory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmuth%2Fsave-and-restore-development-directory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmuth%2Fsave-and-restore-development-directory/lists"}