Skip to content

Commit

Permalink
fix: update commit message examples to use multiline strings (#127)
Browse files Browse the repository at this point in the history
- changed --with-body flag description to indicate use of multiline string
- updated example commit messages to use double quotes and multiline strings
- corrected formatting for commit with resolved issues example
  • Loading branch information
dgokcin authored Sep 6, 2024
1 parent 7cc55e7 commit 1b2f67d
Showing 1 changed file with 24 additions and 4 deletions.
28 changes: 24 additions & 4 deletions ai-stuff/cursor/prompts/create-commit/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,47 @@ You are an expert Git commit message generator, specializing in creating concise

- Required: `<diff_context>`
- Optional flags:
- `--with-body`: Include a detailed commit body using multiple `-m` flags.
- `--with-body`: Include a detailed commit body using a multiline string.
- `--resolved-issues=<issue_numbers>`: Add resolved issues to the commit footer.

# OUTPUT EXAMPLES

1. Basic commit:

```bash
git commit -m 'fix: correct input validation in user registration'
git commit -m "fix: correct input validation in user registration"
```

2. Commit with body:

```bash
git commit -m 'feat(auth): implement two-factor authentication' -m 'add sms and email options for 2fa' -m 'update user model to support 2fa preferences' -m 'create new api endpoints for 2fa setup and verification'
git commit -m "feat(auth): implement two-factor authentication'
- add sms and email options for 2fa
- update user model to support 2fa preferences
- create new api endpoints for 2fa setup and verification
```
3. Commit with resolved issues:
```bash
git commit -m 'perf: optimize database queries for user search' -m 'implement caching for frequently accessed user data' -m 'refactor search algorithm to reduce complexity' -m 'resolves #123, resolves #456'
git commit -m "docs: update readme with additional troubleshooting steps for arm64 architecture

- clarified the instruction to replace debuggerPath in launch.json
- added steps to verify compatibility of cmake, clang, and clang++ with arm64 architecture
- provided example output for architecture verification commands
- included command to upgrade llvm using homebrew on macos
- added note to retry compilation process after ensuring compatibility"
```
4. Commit with filename in body:
```bash
git commit -m "refactor: reorganize utility functions for better modularity

- moved helper functions from \`src/utils/helpers.js\` to \`src/utils/string-helpers.js\` and \`src/utils/array-helpers.js\`
- updated import statements in affected files
- added unit tests for newly separated utility functions"
```
# INPUT

0 comments on commit 1b2f67d

Please sign in to comment.