forked from mufeedvh/code2prompt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
write-git-commit.hbs
28 lines (21 loc) · 1.11 KB
/
write-git-commit.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Project Path: {{ absolute_code_path }}
I'd like you to generate a high-quality git commit message for the provided `git diff`. Analyze the diff to understand the purpose and functionality.
Source Tree:
```
{{ source_tree }}
```
{{#if git_diff}}
Diff:
```
{{git_diff}}
```
{{/if}}
The git commit should adhere to these points:
1. Concise Subject: Short and informative subject line, less than 50 characters.
2. Descriptive Body: Optional summary of 1 to 2 sentences, wrapping at 72 characters.
3. Use Imperative Mood: For example, "Fix bug" instead of "Fixed bug" or "Fixes bug."
4. Capitalize the Subject: First letter of the subject should be capitalized.
5. No Period at the End: Subject line does not end with a period.
7. Separate Subject From Body With a Blank Line: If using a body, leave one blank line after the subject.
Write the content in Markdown format. Use your analysis of the diff to generate a short, naccurate and helpful commit message.
Feel free to infer reasonable details if needed, but try to stick to what can be determined from the diff itself. Let me know if you have any other questions as you're writing!