{"id":18375496,"url":"https://github.com/riboseinc/split-git","last_synced_at":"2025-10-08T11:55:18.600Z","repository":{"id":83923810,"uuid":"140832705","full_name":"riboseinc/split-git","owner":"riboseinc","description":"Bash script to facilitate splitting of a Git repo into sub-repos","archived":false,"fork":false,"pushed_at":"2018-07-16T09:07:52.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-10-02T05:54:34.163Z","etag":null,"topics":["bash","git","source-code-management"],"latest_commit_sha":null,"homepage":null,"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/riboseinc.png","metadata":{"files":{"readme":"README.adoc","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,"zenodo":null}},"created_at":"2018-07-13T10:19:43.000Z","updated_at":"2023-03-31T06:45:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"acbd70a7-26c0-442c-a76e-eff5ca0a87a7","html_url":"https://github.com/riboseinc/split-git","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/riboseinc/split-git","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fsplit-git","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fsplit-git/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fsplit-git/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fsplit-git/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riboseinc","download_url":"https://codeload.github.com/riboseinc/split-git/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fsplit-git/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278939304,"owners_count":26072277,"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-08T02:00:06.501Z","response_time":56,"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":["bash","git","source-code-management"],"created_at":"2024-11-06T00:19:12.319Z","updated_at":"2025-10-08T11:55:18.594Z","avatar_url":"https://github.com/riboseinc.png","language":"Shell","readme":"= split-git\n\n== Introduction\n\nSplit up the given big repo into individual package-related repos.\n\n=== Goals\n\n- Keep the common code in a submodule in those repos (e.g., as `common/`).\n- Try to keep the related git history intact (using `git subtree split`).\n- The split-up repos are to be in the same path level as the parent one, unless \n  a second argument is provided (see `usage()`).\n\nOriginal motivation is to split up the monolithic rpm-specs repo into individual \npackage-related repos.\n\nThis script uses The Easy Way(tm):\nhttps://stackoverflow.com/questions/359424/detach-move-subdirectory-into-separate-git-repository/17864475#17864475\n\n== Prerequisites\n\nRequires Git 1.7.11+ (i.e. the `git subtree` command).\n\n== Installation\n\nCopy `bin/split-git` into one of the paths in `$PATH`:\n\n[source,console]\n----\n$ git clone https://github.com/riboseinc/split-git\n$ export PATH=\"${PWD}/split-git/bin:${PATH}\"\n$ split-git\nUsage: split-git ...\n----\n\n== Usage\n\n[source,console]\n----\n$ split-git \u003cbig-repo-path\u003e [target-subrepo-path]\n----\n\n=== Scenario\n\n[source,console]\n----\na@b:~/big-repo$ ls\na/ b/ c/ d/ e/\n\na@b:~/big-repo$ ls */prepare.sh\na/prepare.sh  c/prepare.sh  e/prepare.sh\nb/prepare.sh  d/prepare.sh\n\na@b:~/big-repo$ git branch\n* split\nmaster\n\na@b:~/big-repo$ mkdir /tmp/split-repos\n\na@b:~/big-repo$ COMMON_LINK=clone \\\n\u003e   SUB_REPO_PREFIX=myrepo- \\\n\u003e   SUB_REPO_INDICATOR_FILE=prepare.sh \\\n\u003e   BIG_REPO_POST_SPLIT_BRANCH=split \\\n\u003e   BIG_REPO_REF_IN_SUB_REPO=common \\\n\u003e   BIG_REPO_SPLIT_BRANCH_PREFIX=split- \\\n\u003e   split-git ~/big-repo /tmp/split-repos\n... ...\n\na@b:~/big-repo$ cd /tmp/split-repos; ls\nmyrepo-a/  myrepo-c/  myrepo-e/\nmyrepo-b/  myrepo-d/\n\na@b:/tmp/split-repos$ cd myrepo-a; ls\ncommon/\n\na@b:/tmp/split-repos/myrepo-a$ cd common; git branch\n* split\nsplit-a\nsplit-b\nsplit-c\nsplit-d\nsplit-e\nmaster\n----\n\n=== Parameters\n\nCOMMON_LINK::\n- enums: `clone`|`sym`|`sub`\n- default: `sub`\n- The method { `sub` | `sym` | `clone` } to use when linking from sub-repo to \n  the big-repo\n\nSUB_REPO_PREFIX::\n- default: `myrepo-`\n- The prefix prepended to ${package_name}, as the sub-repo name\n\nSUB_REPO_INDICATOR_FILE::\n- default: `prepare.sh`\n- The file within a subfolder in big-repo that indicates fit for splitting\n\nBIG_REPO_POST_SPLIT_BRANCH::\n- default: `split`\n- The branch in big repo crafted for post-split operations\n\nBIG_REPO_REF_IN_SUB_REPO::\n- default: `common`\n- The path within each sub-repo that references the big repo\n\nBIG_REPO_SPLIT_BRANCH_PREFIX::\n- default: `split-`\n- The branch name prefix for each sub-repo-branch created in big repo\n\n== Contributing\n\nBug reports and pull requests are welcome on GitHub at\nhttps://github.com/riboseinc/split-git. This project is intended to be a\nsafe, welcoming space for collaboration, and contributors are expected to\nadhere to the http://contributor-covenant.org[Contributor Covenant] code of\nconduct.\n\n== License\n\nThe software is available as open source under the terms of the\nhttp://opensource.org/licenses/MIT[MIT License].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friboseinc%2Fsplit-git","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friboseinc%2Fsplit-git","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friboseinc%2Fsplit-git/lists"}