https://github.com/saswatamcode/submoduler
WIP vibecoded tool (need to review)
https://github.com/saswatamcode/submoduler
Last synced: 5 months ago
JSON representation
WIP vibecoded tool (need to review)
- Host: GitHub
- URL: https://github.com/saswatamcode/submoduler
- Owner: saswatamcode
- License: apache-2.0
- Created: 2025-08-28T15:56:31.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T16:07:04.000Z (7 months ago)
- Last Synced: 2025-08-28T23:04:02.037Z (7 months ago)
- Language: Go
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# submoduler
> [!NOTE]
> This entire Go module was generated by Google's Gemini AI initially. While it has been tested/reviewed for the described functionality, it may still contain unexpected behaviors. Use with discretion.
A simple, zero-dep robust command-line tool for updating Git submodules with ease.
`submoduler` is a smart utility that handles the common pain points of managing Git submodules. It ensures your submodules are initialized, fetches the latest changes, and updates them either to their latest tracked commit or to a specific commit, tag, or branch you define.
## Features
* **Automatic Initialization**: Clones and initializes any missing submodules before starting.
* **Safe Default Updates**: Updates submodules to the latest commit on their tracked remote branch, correctly handling "detached HEAD" states.
* **Specific Version Pinning**: Easily check out a specific commit hash, release tag, or branch for any submodule.
* **Cloning Progress**: Shows real-time progress when cloning new submodules.
* **Verbose Output**: Optional `-v` flag to see the underlying Git commands being executed.
## Installation
Ensure you have Go installed and your `$GOPATH/bin` (or `$HOME/go/bin`) is in your system's `PATH`.
```bash
go install github.com/saswatamcode/submoduler@latest
```
## Usage
Run the tool from the root directory of your Git repository.
```bash
submoduler [flags] [submodule1=ref] [submodule2=ref] ...
```
### Options
* `-v`: Enable verbose mode to show all Git commands being run.
### Arguments
* **`[submodule_path=ref]`** (Optional): Specify a target for one or more submodules.
* `submodule_path`: The relative path to the submodule.
* `ref`: The Git reference to check out (can be a commit hash, tag, or branch name).
If no arguments are provided, `submoduler` will update all submodules to the latest commit on their respective tracked branches.
### Examples
**1. Update all submodules to their latest versions:**
```bash
submoduler
```
**2. Update a specific submodule to a release tag:**
```bash
submoduler path/to/my-lib=v2.5.1
```
**3. Update multiple submodules to different refs:**
```bash
submoduler libs/api=a1b2c3d4 common/utils=main
```
**4. Update all submodules with verbose output:**
```bash
submoduler -v
```