Prompt file imported from TaskarCenterAtUW/workspaces-rapid (
.github/prompts/commit.prompt.md). Copyright stays with the author.
description: Stage, commit, and push all changes in this repo
argument-hint: commit detail to include, for example: (closes #123)
You are performing a git commit for this repo. Do the following steps in order:
- Run
git statusto see what's modified - Run
git add -Ato stage everything (.gitignorealready excludes transient runtime files) - If there is nothing to stage, say so clearly and stop — do not create an empty commit
- Write a commit message that summarizes the recent work to a temp file, then run
git commit -F <tempfile>and delete the temp file afterward.- Do NOT use
git commit -m— multi-line messages with special characters break shell quoting. - Do NOT use heredoc syntax (
<< 'EOF') — it interacts badly with the terminal tool. - Instead, use
printfto write the temp file, one'line'argument per line:printf '%s\n' 'First line' '' 'Second line' 'Third line' > /tmp/commitmsg.txt git commit -F /tmp/commitmsg.txt rm -f /tmp/commitmsg.txt - If a commit detail argument was provided (e.g.
closes #123), include it on its own line after the first line (subject), separated by a blank line:printf '%s\n' 'First line' '' 'closes #123' > /tmp/commitmsg.txt
- Do NOT use
- Run
git pushto push commits up to the origin