{"id":13532757,"url":"https://github.com/josh-project/josh","last_synced_at":"2025-04-29T19:00:08.698Z","repository":{"id":37101844,"uuid":"60837945","full_name":"josh-project/josh","owner":"josh-project","description":"Just One Single History","archived":false,"fork":false,"pushed_at":"2025-02-25T12:12:42.000Z","size":9338,"stargazers_count":1576,"open_issues_count":69,"forks_count":55,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-29T19:00:01.025Z","etag":null,"topics":["git","monorepo","scm","workflow"],"latest_commit_sha":null,"homepage":"https://josh-project.github.io/josh/","language":"Rust","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/josh-project.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":"2016-06-10T09:45:46.000Z","updated_at":"2025-04-27T15:52:40.000Z","dependencies_parsed_at":"2024-02-21T14:28:32.362Z","dependency_job_id":"e53d0654-31f0-4cad-aa57-a9d65a73a586","html_url":"https://github.com/josh-project/josh","commit_stats":{"total_commits":1497,"total_committers":25,"mean_commits":59.88,"dds":0.5150300601202404,"last_synced_commit":"356c9d70edef48fa60c849c23d9c0d4240758579"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josh-project%2Fjosh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josh-project%2Fjosh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josh-project%2Fjosh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/josh-project%2Fjosh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/josh-project","download_url":"https://codeload.github.com/josh-project/josh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251565802,"owners_count":21609979,"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","monorepo","scm","workflow"],"created_at":"2024-08-01T07:01:13.523Z","updated_at":"2025-04-29T19:00:08.664Z","avatar_url":"https://github.com/josh-project.png","language":"Rust","funding_links":[],"categories":["版本控制系统和附加组件","Rust","workflow"],"sub_categories":["Git"],"readme":"![Just One Single History](/splash.png)\n\nCombine the advantages of a monorepo with those of multirepo setups by leveraging a\nfast, incremental, and reversible implementation of git history filtering.\n\n`josh-proxy` can be integrated with any git host:\n\n```\n$ docker run \\\n    -p 8000:8000 \\\n    -e JOSH_REMOTE=https://github.com \\\n    -v josh-vol:/data/git \\\n    joshproject/josh-proxy:latest\n```\n\nSee [Container options](https://josh-project.github.io/josh/reference/container.html) for full list of environment variables.\n\n## Use cases\n\n### Partial cloning \u003ca href=\"https://josh-project.dev/~/ui/browse?repo=josh.git\u0026path=\u0026filter=%3A%2Fdocs\u0026rev=HEAD\"\u003e\u003cimg src=\"https://img.shields.io/badge/try_it-josh--project.dev-black\"/\u003e\u003c/a\u003e\n\nReduce scope and size of clones by treating subdirectories of the monorepo\nas individual repositories.\n\n```\n$ git clone https://josh-project.dev/josh.git:/docs.git\n```\n\nThe partial repo will act as a normal git repository but only contain the files\nfound in the subdirectory and only commits affecting those files.\nThe partial repo supports both fetch as well as push operation.\n\nThis helps not just to improve performance on the client due to having fewer files in\nthe tree,\nit also enables collaboration on parts of the monorepo with other parties\nutilizing git's normal distributed development features.\nFor example, this makes it easy to mirror just selected parts of your\nrepo to public github repositories or specific customers.\n\n### Project composition / Workspaces\n\nSimplify code sharing and dependency management. Beyond just subdirectories,\nJosh supports filtering, re-mapping and composition of arbitrary virtual repositories\nfrom the content found in the monorepo.\n\nThe mapping itself is also stored in the repository and therefore versioned alongside\nthe code.\n\n\u003ctable\u003e\n    \u003cthead\u003e\n        \u003ctr\u003e\n            \u003cth\u003eCentral monorepo\u003c/th\u003e\n            \u003cth\u003eProject workspaces\u003c/th\u003e\n            \u003cth\u003eworkspace.josh file\u003c/th\u003e\n        \u003c/tr\u003e\n    \u003c/thead\u003e\n    \u003ctbody\u003e\n        \u003ctr\u003e\n            \u003ctd rowspan=2\u003e\u003cimg src=\"docs/src/img/central.svg?sanitize=true\" alt=\"Folders and files in central.git\" /\u003e\u003c/td\u003e\n            \u003ctd\u003e\u003cimg src=\"docs/src/img/project1.svg?sanitize=true\" alt=\"Folders and files in project1.git\" /\u003e\u003c/td\u003e\n            \u003ctd\u003e\n\u003cpre\u003e\ndependencies = :/modules:[\n    ::tools/\n    ::library1/\n]\n\u003c/pre\u003e\n        \u003c/tr\u003e\n        \u003ctr\u003e\n            \u003ctd\u003e\u003cimg src=\"docs/src/img/project2.svg?sanitize=true\" alt=\"Folders and files in project2.git\" /\u003e\u003c/td\u003e\n            \u003ctd\u003e\n\u003cpre\u003elibs/library1 = :/modules/library1\u003c/pre\u003e\u003c/td\u003e\n        \u003c/tr\u003e\n    \u003c/tbody\u003e\n\u003c/table\u003e\n\nWorkspaces act as normal git repos:\n\n```\n$ git clone http://josh/central.git:workspace=workspaces/project1.git\n```\n\n### Simplified CI/CD\n\nWith everything stored in one repo, CI/CD systems only need to look into one source for each particular\ndeliverable.\nHowever, in traditional monorepo environments, dependency management is handled by the build system.\nBuild systems are usually tailored to specific languages and need their input already checked\nout on the filesystem.\nSo the question:\n\n\u003e \"What deliverables are affected by a given commit and need to be rebuilt?\"\n\ncannot be answered without cloning the entire repository and understanding how the languages\nused handle dependencies.\n\nIn particular, when using C family languages, hidden dependencies on header files are easy to miss.\nFor this reason, limiting the visibility of files to the compiler by sandboxing is pretty much a requirement\nfor reproducible builds.\n\nWith Josh, each deliverable gets its own virtual git repository with dependencies declared in the `workspace.josh`\nfile. This means answering the above question becomes as simple as comparing commit ids.\nFurthermore, due to the tree filtering, each build is guaranteed to be perfectly sandboxed\nand only sees those parts of the monorepo that have actually been mapped.\n\nThis also means the deliverables to be re-built can be determined without cloning any repos like\ntypically necessary with normal build tools.\n\n### GraphQL API\n\nIt is often desireable to access content stored in git without requiring a clone of the repository.\nThis is useful for CI/CD systems or web frontends, such as dashboards.\n\nJosh exposes a GraphQL API for that purpose. For example, it can be used to find all workspaces currently\npresent in the tree:\n\n```\nquery {\n  rev(at:\"refs/heads/master\", filter:\"::**/workspace.josh\") {\n    files { path }\n  }\n}\n```\n\n\n### Caching proxy\n\nEven without using the more advanced features like partial cloning or workspaces,\n`josh-proxy` can act as a cache to reduce traffic between locations or keep your CI from\nperforming many requests to the main git host.\n\n## FAQ\n\nSee [here](https://josh-project.github.io/josh/faq.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosh-project%2Fjosh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjosh-project%2Fjosh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjosh-project%2Fjosh/lists"}