{"id":17080472,"url":"https://github.com/pmiossec/git-prepare-save","last_synced_at":"2026-04-30T02:31:44.405Z","repository":{"id":139074096,"uuid":"112845973","full_name":"pmiossec/git-prepare-save","owner":"pmiossec","description":null,"archived":false,"fork":false,"pushed_at":"2020-06-10T19:46:49.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-29T13:04:22.595Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pmiossec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2017-12-02T13:53:33.000Z","updated_at":"2020-06-10T19:46:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f64e178-3257-4e2b-a163-2cd343d0258d","html_url":"https://github.com/pmiossec/git-prepare-save","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pmiossec/git-prepare-save","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmiossec%2Fgit-prepare-save","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmiossec%2Fgit-prepare-save/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmiossec%2Fgit-prepare-save/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmiossec%2Fgit-prepare-save/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pmiossec","download_url":"https://codeload.github.com/pmiossec/git-prepare-save/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pmiossec%2Fgit-prepare-save/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32452268,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"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":"2024-10-14T12:44:49.520Z","updated_at":"2026-04-30T02:31:44.400Z","avatar_url":"https://github.com/pmiossec.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git prepare-save\r\n\r\n# Goal\r\n\r\nGit script that could be used to prepare a git repository for:\r\n\r\n* copy/move elsewhere efficiently\r\n* backuping\r\n\r\nIt will store all the changes and data in the git repository and empty the working directory (no data lost!).\r\n\r\n# What do it do\r\n\r\n1. Verify that the folder is a git repository\r\n1. Save all the working directory changes in a stash\r\n1. Garbage collect the git repository to create big pack files easy to copy (and with a total size smaller)\r\n1. Delete all the files and folders tracked in the working directory folder\r\n1. You could then copy efficiently the folder somewhere else\r\n1. You could restore the working directory content with: `git reset --hard HEAD`\"\r\n\r\n# Use\r\n\r\n* In a git repository folder\r\n\r\n`git prepare-save`\r\n\r\n* In a folder containing a lot of git repositories as sub-folders\r\n\r\n`git prepare-save-all`\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmiossec%2Fgit-prepare-save","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpmiossec%2Fgit-prepare-save","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpmiossec%2Fgit-prepare-save/lists"}