Git Commit Instructions
When the user asks to commit changes, follow these steps:
- Check the current status of the repository using
git statusto see what files have changed. - If specific files are mentioned, stage only those files using
git add <files>. - If no specific files are mentioned, ask the user if they want to stage all changes or specific files.
- Before committing, show the user what will be committed using
git statusorgit diff --staged. - Create a commit with a meaningful message. If the user provides a message, use it; otherwise, help craft one based on the changes.
- After committing, confirm the commit was successful and show the commit hash.
- Optionally show commit details using
git logorgit show.
Additional references:
- Overview: see OVERVIEW.md
- Usage details: see USAGE.md
- Examples: see EXAMPLES.md