{"id":18750688,"url":"https://github.com/webiny/gitsplit","last_synced_at":"2025-04-12T23:32:23.300Z","repository":{"id":28412443,"uuid":"31926923","full_name":"webiny/GitSplit","owner":"webiny","description":"A tool to automatically update readonly github repos, based on a provided master repo.","archived":false,"fork":false,"pushed_at":"2016-08-23T19:27:35.000Z","size":34,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-26T18:05:51.008Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.webiny.com/","language":"PHP","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/webiny.png","metadata":{"files":{"readme":"README.md","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}},"created_at":"2015-03-09T22:50:25.000Z","updated_at":"2023-05-21T17:38:38.000Z","dependencies_parsed_at":"2022-09-03T16:01:12.091Z","dependency_job_id":null,"html_url":"https://github.com/webiny/GitSplit","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FGitSplit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FGitSplit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FGitSplit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webiny%2FGitSplit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webiny","download_url":"https://codeload.github.com/webiny/GitSplit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647257,"owners_count":21139081,"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-07T17:12:49.565Z","updated_at":"2025-04-12T23:32:21.742Z","avatar_url":"https://github.com/webiny.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"GitSplit Tool\n===================\n\nThis tool is used to semi-automate the management of read-only git repositories,\nthat depend on the provided parent repository.\n\n## Installation\n\n```\ncomposer --global require webiny/github-subtree-tool\n```\n\n## Running the tool\n\nJust run the following command from the terminal, and follow the procedure:\n```\n$ cd vendor/webiny/github-subtree-tool/\n$ php cli.php\n```\n## Requirements\n\n### Configuration\n\nGIT_ACC\n- name of the github account that holds the repos\n- example: Webiny (refers to https://github.com/Webiny)\n\nGIT_REPO\n- name of your `master` repo\n- example: Framework (refers to https://github.com/Webiny/Framework)\n\nGIT_USER\n- your github username\n- should have write access to GIT_REPO\n\nGIT_PASS\n- github password for GIT_ACC\n\nGIT_SUBTREE\n- path where the subtree components are located, inside the `master` repo\n- example: src/Webiny/Components\n\n### Structure and repo names\n\nOn of the most important requirements is that the component repo names match the ones inside the GIT_SUBTREE path on the parent repo.\n\nFor example: https://github.com/Webiny/Framework/tree/master/src/Webiny/Component/**Annotations**\nmatches: https://github.com/Webiny/**Annotations**\n\n\n## The back story behind the tool\n\nLet's take our Webiny Framework for example.\n\nThe [Framework](https://githuh.com/webiny/framework) repo consists of several components like `Storage`, `Entity`, `Mailer` and others.\n\nThese components reside under the `Framework` repo inside `src/Webiny/Component`.\n\nBut these components also have their own github repositories:\n\n- https://github.com/Webiny/Storage\n- https://github.com/Webiny/Entity\n- https://github.com/Webiny/Mailer\n\nThe reason for this is that this is a modular framework, meaning you can use\nany of the components without actually using the whole framework. And today, the best way to install a PHP component is over composer, meaning you need to have a separate repo for each of the components.\n\nWe always do our development inside the `Framework` repo, meaning over time we need to sync the changes to the component repos, including creating branches, releases and updating the composer.json file.\n\nWe have created this tool to automate that work.\n\n## How it works\n\nIt first checks out the defined branch from your parent repository, in our case that's the `Framework` repo.\n\nThen it checks which components are contained inside that repo, under the define path, in our case that’s the `src/Webiny/Components`.\n\nAfter that, it checks out the component branch and copies over the changes from the parent repo.\n\nIn the end, it creates the requested branch or tag, on both the component repos and the parent repo.\nOptionally, it can also update the composer.json files\n\n## Safety\n\nThis tool communicates with your github repo, so make sure you understand what you are doing.\n\nJust to be safe, the tool will at the very end of the process ask for your confirmation to confirm that you want to push all the changes. Until that confirmation, no changes are done on the repo.\n\n## Bugs and improvements\n\nJust report them under issues, or even better, send a pull request :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebiny%2Fgitsplit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebiny%2Fgitsplit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebiny%2Fgitsplit/lists"}