{"id":19168411,"url":"https://github.com/bloomberg/repofactor","last_synced_at":"2025-05-07T14:41:45.248Z","repository":{"id":66125210,"uuid":"55427780","full_name":"bloomberg/repofactor","owner":"bloomberg","description":"Tools for refactoring history of git repositories","archived":false,"fork":false,"pushed_at":"2017-02-03T08:22:43.000Z","size":26,"stargazers_count":62,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T23:31:58.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloomberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2016-04-04T16:39:35.000Z","updated_at":"2025-04-16T14:07:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc0ff01b-10bd-4cf6-8c32-d58aacd69ee1","html_url":"https://github.com/bloomberg/repofactor","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/bloomberg%2Frepofactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Frepofactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Frepofactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Frepofactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloomberg","download_url":"https://codeload.github.com/bloomberg/repofactor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897412,"owners_count":21821433,"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-11-09T09:42:33.841Z","updated_at":"2025-05-07T14:41:45.222Z","avatar_url":"https://github.com/bloomberg.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finding the causes of repository bloat\n\nThis project contains a bunch of tools to help analyse the largest blobs (by\n\"on disk\" storage) in a repository.\n\nHere is a sample sequence of commands showing typical usage:\n\n- Typically start with a clean clone of the repository that you want\n  to analyse. It can be bare. For reasonable performance it should be\n  cloned onto \"local\" disk on a reasonably fast Linux machine.\n\n- Add these tools to your `PATH` or use a full path to each\n  script or executable.\n\n- Run these tools from the repository undergoing analysis and cleaning.\n\n- Work out a suitable threshold size by running `generate-larger-than` with\n  experimental parameters. 50000 might be a good starting point. The size is\n  \"average bytes after compression by Git\".\n\n- Generate a sorted list of objects with file information\n\n  `generate-larger-than 50000 | sort -k3n | add-file-info \u003e../largeobjs.txt`\n\n- Make a report showing the summary of each commit together with the paths which\n  introduce the large objects, their uncompressed size and file information\n\n  `report-on-large-objects ../largeobjs.txt`\n\n# Filtering out large blobs\n\n- Create a temporary work directory and export `RFWORK_DIR` to point to this\ndirectory (defaults to the current directory).\n\n- Again, run all commands from the repository being analysed.\n\n- From the above report, edit down a list of blob ids that can be eliminated.\n  Call this `large-objects.txt`.\n\n- Generate a remove script\n\n  ```\n  make-remove-blobs large-objects.txt \u003e\"$RFWORK_DIR\"/remove-blobs.pl\n  chmod +x \"$RFWORK_DIR\"/remove-blobs.pl\n  ```\n\n- Optionally edit the remove script to filter out any paths that are not\n  required at the same time\n\n- Run the filter branch\n\n  `run-filter-branch`\n\n- Create a new \"easy rebase\" script for moving work-in-progess branches from the\n  old history to the new history\n\n  `make-mtnh \u003e\"$RFWORK_DIR\"/move-to-new-history`\n\n- Push the rewritten refs and the `rewrite-commit-map` branch to all central\n  repositories\n\n- Deploy `move-to-new-history` for users to use\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Frepofactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloomberg%2Frepofactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Frepofactor/lists"}