Skip to content

Commit b684a50

Browse files
committed
docs: enhance README with usage examples and output samples
- Added instructions for staging changes before generating commit messages. - Clarified the use of the `--examples` flag for providing context to the LLM. - Included an example of generated output for better user understanding. - Added a link to the repository's commit history for more examples.
1 parent ace40ac commit b684a50

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

README.md

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ gh auth refresh -h github.com -s read:org
3434
Generate a commit message for the staged changes:
3535

3636
```bash
37+
# Stage changes in git repo
38+
git add .
39+
40+
# Generate commit message
3741
gh commitmsg
3842
```
3943

@@ -43,6 +47,23 @@ gh commitmsg
4347
# Use different language
4448
gh commitmsg --language russian
4549

46-
# Use previous 3 commit messages as context
50+
# Use previous 3 commit messages as an example for LLM
4751
gh commitmsg --examples
48-
```
52+
```
53+
54+
### Output examples
55+
56+
LLM will generate something like:
57+
58+
```
59+
feat: add CI/CD workflows, license, and update project details
60+
61+
- Introduced .github/workflows/ci.yml:
62+
- Added CI pipeline for testing, building, and artifact upload.
63+
- Configured matrix builds for multiple OS/architectures.
64+
- Added .github/workflows/release.yml:
65+
- Automated release process triggered by version tags.
66+
- Builds binaries for Linux, macOS, and Windows.
67+
```
68+
69+
For more examples, [see commit messages in this repo](https://github.com/hazadus/gh-commitmsg/commits/main/).

0 commit comments

Comments
 (0)