Skip to content

Commit c957a8c

Browse files
committed
Update script to generate commit message from git diff
1 parent 7251b23 commit c957a8c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-commit-push-script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ diff=$(git diff --cached)
2121
MODEL="mistral"
2222

2323
# Prepare the prompt
24-
PROMPT=$(printf "You are an expert software engineer.\n\nYour job is to generate a short, descriptive commit message from the following git diff.\nOnly return the commit message, 72 characters maximum in length. Do not include any other text in the response.\n\nGit diff:\n%s" "$diff")
24+
PROMPT=$(printf "You are an expert software engineer.\n\nYour job is to generate a concise, descriptive commit message from the following git diff.\nThe commit message MUST be 72 characters or less - this is a strict requirement.\nOnly return the commit message itself without quotes, explanations or additional text.\n\nGit diff:\n%s" "$diff")
2525

2626
# Run the model and capture output
2727
COMMIT_MSG=$(echo "$PROMPT" | ollama run "$MODEL")

0 commit comments

Comments
 (0)