{"id":16728476,"url":"https://github.com/gwendolenlynch/git-subtree-sync","last_synced_at":"2025-06-11T08:08:48.718Z","repository":{"id":118645955,"uuid":"113845062","full_name":"GwendolenLynch/git-subtree-sync","owner":"GwendolenLynch","description":"A small tool for managing read-only subtrees split from a monolithic development repository.","archived":false,"fork":false,"pushed_at":"2018-01-19T10:57:00.000Z","size":9,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T11:25:31.464Z","etag":null,"topics":["git","subtree","subtree-scripts"],"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/GwendolenLynch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-12-11T10:26:59.000Z","updated_at":"2024-01-13T23:57:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fc26636-feda-45c4-809a-4a0254079889","html_url":"https://github.com/GwendolenLynch/git-subtree-sync","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/GwendolenLynch%2Fgit-subtree-sync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GwendolenLynch%2Fgit-subtree-sync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GwendolenLynch%2Fgit-subtree-sync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GwendolenLynch%2Fgit-subtree-sync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GwendolenLynch","download_url":"https://codeload.github.com/GwendolenLynch/git-subtree-sync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GwendolenLynch%2Fgit-subtree-sync/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259227952,"owners_count":22824903,"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":["git","subtree","subtree-scripts"],"created_at":"2024-10-12T23:10:29.146Z","updated_at":"2025-06-11T08:08:48.696Z","avatar_url":"https://github.com/GwendolenLynch.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git subtree sync\n\nA small tool for managing read-only subtrees split from a monolithic\ndevelopment repository.\n\n\n## Use case\n\nThis tool is very limited and if you don't know what git subtrees are, and what\nthey're useful for then **this is not the tool for you**. :koala:\n\nIf you wish to do development of a large project in a single monolithic git\nrepository, and distribute the components via separate repositories, then\nthis tool might be useful to you. \n\nThis tool just:\n - Create/updates subtree branches\n - Copies tags from the primary repository to the subtree repositories\n\n\n## Requirements\n\n- git 1.8.0+\n- bash 4.0 or greater\n- GNU grep\n- GNU awk\n\n\n## Installation\n\n```bash\ngit clone https://github.com/GawainLynch/git-subtree-sync.git\nsudo ln -s /path/to/git-subtree-sync/git-subtree-sync.sh /usr/local/bin/git-subtree-sync\n```\n\n## Configuration\n\nYou will need to create a file called `.gitsubtree` in your monolithic repository,\nand populate it with the following parameters:\n\n```bash\n# Base URL of the upstream subtree repositoies \nREMOTE_BASE_URL=git@github.com:your-org-name\n\n# Full path to the local primary monolithic repo\nMONOLITH_REPO_ROOT=/path/to/monolithic/repo\n\n# Full *base* path that will contain the subtree repositories\nSUBTREE_REPO_ROOT=/path/to/subtrees\n\n# Bash 4+ associative array of:\n#\n# Key: Subtree's project name. Will be used for the name of the subtree's \n#      directory under SUBTREE_REPO_ROOT and appended to REMOTE_BASE_URL\n#\n# Value: The relative path of the subtree in the monolithic repository\n#\nPREFIX_DIRS=(\n    [\"project-a\"]=\"src/ProjectA/\"\n    [\"project-b\"]=\"src/ProjectB/\"\n    [\"project-c\"]=\"src/ProjectC/\"\n)\n```\n\nA `.gitsubtree.dist` file is in the root of this repo that can be copies and\nadapted as needed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwendolenlynch%2Fgit-subtree-sync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgwendolenlynch%2Fgit-subtree-sync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwendolenlynch%2Fgit-subtree-sync/lists"}