update docs

This commit is contained in:
Adam Jeniski 2026-01-05 02:42:15 -05:00
parent 6e983f08e8
commit 9fecfeee46
2 changed files with 30 additions and 5 deletions

View File

@ -10,14 +10,25 @@ A CLI tool for making commits to many subrepos after a distributed change.
- Automatically detects which subrepos have uncommitted changes - Automatically detects which subrepos have uncommitted changes
- Creates commits with a single message across all modified subrepos - Creates commits with a single message across all modified subrepos
- Push changes to remote repositories after committing
- View status of all modified repositories
- Reports commit status for each subrepo - Reports commit status for each subrepo
- Written in Babashka for fast startup and easy distribution - Written in Babashka for fast startup and easy distribution
## Usage ## Usage
```bash ```bash
# Show status of all modified subrepos
./commitly status
# Commit changes across all modified subrepos # Commit changes across all modified subrepos
./commitly "Your commit message here" ./commitly "Your commit message here"
# Commit and push changes
./commitly -p "Your commit message here"
# Push only (without committing)
./commitly -p
``` ```
## Requirements ## Requirements
@ -38,7 +49,11 @@ ln -s $(pwd)/commitly /usr/local/bin/commitly
1. Scans parent directory for git repositories 1. Scans parent directory for git repositories
2. Checks each repository for uncommitted changes (staged or unstaged) 2. Checks each repository for uncommitted changes (staged or unstaged)
3. Commits changes in each modified repository with the provided message 3. Depending on the command:
- `status`: Shows git status for all modified repositories
- `<message>`: Commits changes in each modified repository with the provided message
- `-p <message>`: Commits and pushes changes to remote
- `-p` (no message): Pushes all repositories without committing
4. Reports success/failure for each repository 4. Reports success/failure for each repository
## Use Case ## Use Case

View File

@ -9,15 +9,22 @@ Commitly is a Babashka script located at `commitly/commitly` that commits and pu
## Usage ## Usage
```bash ```bash
./commitly/commitly [-p] <commit-message> ./commitly/commitly status # Show status of modified repos
./commitly/commitly [-p] <commit-message> # Commit (and push) changes
``` ```
### Options ### Options
- `status` - Show git status for all modified repositories
- `-p` - Push changes after committing. If no commit message is provided with `-p`, it will skip committing and just push all subrepos. - `-p` - Push changes after committing. If no commit message is provided with `-p`, it will skip committing and just push all subrepos.
### Examples ### Examples
**Show status of all modified repos:**
```bash
./commitly/commitly status
```
**Commit all modified repos with a message:** **Commit all modified repos with a message:**
```bash ```bash
./commitly/commitly "fix: update configuration" ./commitly/commitly "fix: update configuration"
@ -37,8 +44,11 @@ Commitly is a Babashka script located at `commitly/commitly` that commits and pu
1. **Discovery**: Scans the current directory for subdirectories containing `.git` folders 1. **Discovery**: Scans the current directory for subdirectories containing `.git` folders
2. **Detection**: Checks each repository for uncommitted changes using `git status --porcelain` 2. **Detection**: Checks each repository for uncommitted changes using `git status --porcelain`
3. **Commit**: Runs `git add -A` and `git commit -m "<message>"` for each modified repo 3. **Action**: Depending on the command:
4. **Push**: If `-p` flag is present, runs `git push` for each successfully committed repo (or all repos if no message provided) - `status`: Shows full `git status` output for each modified repo
- `<message>`: Runs `git add -A` and `git commit -m "<message>"` for each modified repo
- `-p <message>`: Commits and then runs `git push` for each successfully committed repo
- `-p` (no message): Runs `git push` for all repos without committing
## When to Use ## When to Use
@ -51,7 +61,7 @@ The monorepo contains multiple independent git repositories:
- `www/` - Dashboard website - `www/` - Dashboard website
- `gateway/` - Nginx reverse proxy - `gateway/` - Nginx reverse proxy
- `commitly/` - This tool itself - `commitly/` - This tool itself
- `just-vibes/` - Other projects - Other service repositories as needed
Each has its own `.git` directory and is deployed independently via Gitea Actions when pushed to main. Each has its own `.git` directory and is deployed independently via Gitea Actions when pushed to main.