{"id":22614314,"url":"https://github.com/pistonite/magoo","last_synced_at":"2025-04-11T11:03:38.139Z","repository":{"id":208944720,"uuid":"721927552","full_name":"Pistonite/magoo","owner":"Pistonite","description":"A wrapper for `git submodule`","archived":false,"fork":false,"pushed_at":"2024-06-01T06:53:18.000Z","size":176,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-25T07:23:53.124Z","etag":null,"topics":["git","submodule","tools"],"latest_commit_sha":null,"homepage":"https://docs.rs/magoo","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/Pistonite.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":"2023-11-22T04:19:37.000Z","updated_at":"2024-06-01T06:53:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"4c2cbdb8-f70c-4065-b962-295ff6ab258e","html_url":"https://github.com/Pistonite/magoo","commit_stats":null,"previous_names":["pistonite/magoo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pistonite%2Fmagoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pistonite%2Fmagoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pistonite%2Fmagoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pistonite%2Fmagoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pistonite","download_url":"https://codeload.github.com/Pistonite/magoo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248381759,"owners_count":21094525,"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","submodule","tools"],"created_at":"2024-12-08T18:09:11.154Z","updated_at":"2025-04-11T11:03:38.114Z","avatar_url":"https://github.com/Pistonite.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) magoo\n\n![Build Badge](https://img.shields.io/github/actions/workflow/status/Pistonite/magoo/rust.yml)\n![Version Badge](https://img.shields.io/crates/v/magoo)\n![License Badge](https://img.shields.io/github/license/Pistonite/magoo)\n![Issue Badge](https://img.shields.io/github/issues/Pistonite/magoo)\n\nThis ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) is Magoo, he helps you manage git submodules with ease, like `npm` or `cargo`, but for submodules.\n\nAdding a submodule is easy, but have you ever struggled with:\n- How do I update a submodule?\n- How do I delete a submodule?\n- How do I tell my colleagues how to update their submodules after I update them????\n\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) saves all of us by running the `git` commands for us. He figures out\nall the relevant information from the git repository itself. There's no extra files\nrequired and ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) works out of the box for all git repos with submodules.\n\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) **does not like pipelines**. Please simply let your pipeline\ncheckout the submodules (recursively if needed). For example, if you are using GitHub Actions:\n```yaml\n- uses: actions/checkout@v4\n  with:\n    submodules: recursive\n```\n\n\n## Install ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp)\n\n### ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) As a CLI tool\n```\ncargo install magoo\n```\n\n### ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) As a library\nTo add ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) as a dependency:\n```\ncargo add magoo\n```\nSee https://docs.rs/magoo for more info.\n\n## Use ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp)\n\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) runs `git` commands using sub-processes, so you must have `git` installed on the system.\nBy default, ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) checks if the `git` version is supported.\nTo print what version is supported manually, run:\n```\nmagoo status --git\n```\n\nUnsupported versions might work as well, you can let ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) know with the `--allow-unsupported` flag (note\nit needs to be before the subcommand)\n```\nmagoo --allow-unsupported status\n```\n\n\n### Add a submodule\n```bash\nmagoo install URL PATH\n```\n(`magoo install --help` to see a full list of options)\n\nThe arguments for adding a submodule is very similar to [`git submodule add`](https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt-add-bltbranchgt-f--force--nameltnamegt--referenceltrepositorygt--depthltdepthgt--ltrepositorygtltpathgt)\n\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) needs to know the following to add a submodule.:\n\n|Arg|Description|Default|\n|-|-|-|\n|`URL`| The git URL like `https://github.com/owner/repo`. SSH and relative URLs also work. See [`git submodule add`](https://git-scm.com/docs/git-submodule#Documentation/git-submodule.txt-add-bltbranchgt-f--force--nameltnamegt--referenceltrepositorygt--depthltdepthgt--ltrepositorygtltpathgt) for details | URL is required |\n|`PATH`| The path in your repo the module should be at | Directory at the top level with the same name as the submodule repo|\n|`BRANCH`| The branch to update to when you run `magoo update` | None (`HEAD`) |\n|`NAME`| Name to identify the submodule for other commands | same as `PATH` |\n\nIt's recommended to always specify the `BRANCH`. Git by default will use the `HEAD` branch, which\nis usually not what you want.\n\nThe submodule will not be cloned recursively when adding. If you need, run `magoo install` after the `add` to clone the recursive submodules.\n\n### Initialize/pull the submodules\n```bash\nmagoo install\n```\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) will ensure the submodules are cloned/updated to the commit stored in the index.\nYou should run `magoo install` every time you pull the changes from others, in case they were updated.\nIt also deletes submodules that are deleted by others (by running `status --fix`, see below).\n\nBy default, submodules are installed recursively, you can use `--no-recursive` to only install the ones specified by the top-level repo.\n\n### Show submodule status\n```bash\nmagoo status [--long] [--fix]\n```\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) will show you everything he knows about submodules in the current repo.\n\nThe `--fix` option will bring the submodule states back to a consistent state that ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) likes.\nThe state could be inconsistent if the git files were changed manually or by running\nindividual `git` commands, or by a remote change.\n\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) will fix the state by either de-initializing the submodule (if possible), or delete the submodule.\n\n### Update submodules\n```bash\nmagoo update\n```\nThis tells ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) to update all submodules to be sync with the remote `BRANCH` (specified when submodule was added).\nSee `magoo update --help` for more info.\n\nYou can also:\n- Update one submodule to the latest\n   ```bash\n   magoo update NAME\n   ```\n- Change the branch and/or URL of a submodule\n   ```bash\n   magoo update NAME --branch BRANCH --url URL\n   ```\n\n### Remove submodules\n```bash\nmagoo remove NAME\n```\n![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) will remove every trace of the submodule, with this single command.\n\nNote: Newer versions of git lets you delete a submodule with `git rm`. However, it doesn't delete the content in\n`.git/modules`. ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) deletes those as well.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpistonite%2Fmagoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpistonite%2Fmagoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpistonite%2Fmagoo/lists"}