Skip to content

Commit

Permalink
fix magoo
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistonight committed Nov 24, 2023
1 parent fa33884 commit 8edfa81
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) magoo
# ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) magoo

**In Development. commands left are: status (--fix), install, update, remove**

This ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) is Magoo, he helps you manage git submodules with ease, like `npm` or `cargo`, but for submodules.
This ![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.

Adding a submodule is easy, but have you ever struggled with:
- How do I update a submodule?
- How do I delete a submodule?
- How do I tell my colleagues how to update their submodules after I update them????

![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) saves all of us by running the `git` commands for us. He figures out
![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) saves all of us by running the `git` commands for us. He figures out
all the relevant information from the git repository itself. There's no extra files
required and ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) works out of the box for all git repos with submodules.
required and ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) works out of the box for all git repos with submodules.

![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) **does not like pipelines**. Please simply let your pipeline
![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) **does not like pipelines**. Please simply let your pipeline
checkout the submodules (recursively if needed). For example, if you are using GitHub Actions:
```yaml
- uses: actions/checkout@v4
Expand All @@ -22,25 +22,25 @@ checkout the submodules (recursively if needed). For example, if you are using G
```
## Install ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp)
## Install ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp)
### ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) As a CLI tool
### ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) As a CLI tool
```
cargo install magoo
```

### ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) As a library
To include ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) in your rust application, add it as a depedency. See https://docs.rs/magoo for more info.
### ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) As a library
To include ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) in your rust application, add it as a depedency. See https://docs.rs/magoo for more info.

## Use ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp)
## Use ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp)

![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) runs `git` commands using sub-processes, so you must have `git` installed on the system.
![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.
You can run `magoo status --git` to check what version you have on your system, as well as
the officially supported `git` versions. Unsupported versions might work as well, ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) just doesn't know.
the officially supported `git` versions. Unsupported versions might work as well, ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) just doesn't know.


### Add a submodule
To add a submodule, ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) needs to know:
To add a submodule, ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) needs to know:
- `URL`: The git URL like https://github.com/owner/repo
- `PATH`: The path in your repo the module should be at
- Optionally, `BRANCH`: The branch to update to when you run `magoo update`
Expand Down Expand Up @@ -68,14 +68,14 @@ It also deletes submodules that are deleted by others.
magoo status
magoo status --fix
```
Shows everything ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) knows about submodules in the current repo.
Shows everything ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) knows about submodules in the current repo.

If you have tinkered with submodules yourself, ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) might not like the state since
there could be inconsistencies. ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) will tell you what he doesn't like, and the `--fix` option will fix those.
If you have tinkered with submodules yourself, ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) might not like the state since
there could be inconsistencies. ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) will tell you what he doesn't like, and the `--fix` option will fix those.

### Update submodules

![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) updates the submodule by fetching and checking out the latest updates from the remote, tracked by
![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) updates the submodule by fetching and checking out the latest updates from the remote, tracked by
the `BRANCH` specified when you add it.

- Update all submodules to the latest
Expand All @@ -98,4 +98,4 @@ magoo remove NAME [--force]
`--force` will discard any changes made in the submodule (`git submodule deinit --force`)

Note: Newer versions of git lets you delete a submodule with `git rm`. However, it doesn't delete the content in
`.git/modules`. ![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp) deletes those.
`.git/modules`. ![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp) deletes those.
2 changes: 1 addition & 1 deletion magoo.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
![magoo](https://raw.githubusercontent.com/Pistionight/magoo/main/magoo.webp)
![magoo](https://raw.githubusercontent.com/Pistonite/magoo/main/magoo.webp)

0 comments on commit 8edfa81

Please sign in to comment.