{"id":23881777,"url":"https://github.com/zikani03/git-monorepo","last_synced_at":"2025-04-09T20:53:02.986Z","repository":{"id":64304656,"uuid":"425519659","full_name":"zikani03/git-monorepo","owner":"zikani03","description":"Make Git monorepos like a boss.","archived":false,"fork":false,"pushed_at":"2024-07-24T16:17:56.000Z","size":48,"stargazers_count":11,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T20:52:57.990Z","etag":null,"topics":["devtools","git","monorepo"],"latest_commit_sha":null,"homepage":"https://labs.zikani.me/git-monorepo/","language":"Go","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/zikani03.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-07T14:04:54.000Z","updated_at":"2024-12-13T12:22:26.000Z","dependencies_parsed_at":"2024-06-20T16:36:55.775Z","dependency_job_id":"80f8f56e-e86c-4d81-ba05-e2edefd10642","html_url":"https://github.com/zikani03/git-monorepo","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-monorepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-monorepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-monorepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zikani03%2Fgit-monorepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zikani03","download_url":"https://codeload.github.com/zikani03/git-monorepo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111976,"owners_count":21049577,"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":["devtools","git","monorepo"],"created_at":"2025-01-04T01:58:55.995Z","updated_at":"2025-04-09T20:53:02.963Z","avatar_url":"https://github.com/zikani03.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"git-monorepo\n============\n\n\u003e Make Git monorepos like a boss.\n\n`git-monorepo` is a tool that allows you to combine two or more Git repositories into one repository and preserves the commit history for each repo as well as the directory structure.\n\n## Features\n\n- Preserves commit history for each repo\n- Preserves Directory structure of each repo\n- Orders Commits chronologically\n\n## Building\n\ngit-monorepo requires atleast Go 1.18 to build. \n\n```sh\n$ git clone https://github.com/zikani03/git-monorepo\n$ go build -o git-monorepo ./cmd/main.go\n```\n\n## Usage\n\n\u003e NOTE: It's currently very CPU intensive at the moment, I'm gonna look for ways to reduce CPU usage. May also be memory intensive if you use the `--in-memory` flag. I also haven't tried it on very large repos (i.e. repos with very many many commits)\n\n### Create monorepo locally\n\n```shell\n$ git-monorepo init --sources gh:zikani03/articulated,gh:zikani03/pakadali --target toy-projects\n```\n\nOr with full git urls:\n\n```shell\n$ git-monorepo init --sources https://github.com/nndi-oss/ussdproxy,gh:nndi-oss/ussd-whois,https://github.com/nndi-oss/dialoguss --target ussd-projects\n```\n\n## IDEAS / TODO\n\n- Support \"squashing-merging\" - that is merge the repos without preserving fine-grained commit history\n\n- Make Git Submodules instead of mangling history\n\n- Clone repositories in parallel\n\n- Create monorepo locally and push to github (and other git hosting services)\n\n```shell\n$ git monorepo init --preserve-history \\ \n  --sources gh:zikani03/articulated,gh:zikani03/pakadali \\ \n  --target gh:zikani03/toy-projects \\ \n  --github-token=$GH_TOKEN\n```\n\n## CREDITS\n\n- [Go-Git](https://pkg.go.dev/github.com/go-git/go-git/v5)\n\n\n## References\n\n- [Atlassian Monorepos tutorial](https://www.atlassian.com/git/tutorials/monorepos)\n- [Git SCM - Appendix B: Embedding Git in your Applications - go-git](https://git-scm.com/book/en/v2/Appendix-B%3A-Embedding-Git-in-your-Applications-go-git)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikani03%2Fgit-monorepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzikani03%2Fgit-monorepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzikani03%2Fgit-monorepo/lists"}