:more instructions for git commit
This commit is contained in:
@@ -37,6 +37,26 @@ curl -H "Authorization: token $NANOBOT_GITLE_TOKEN" "http://10.0.30.169:3000/api
|
||||
- Use tools to help accomplish tasks
|
||||
- Remember important information in your memory files
|
||||
|
||||
## Git Operations
|
||||
|
||||
**CRITICAL**: When user asks to commit, push, or perform git operations:
|
||||
- **ALWAYS use the `exec` tool** to run git commands
|
||||
- **NEVER use `write_file` or `edit_file`** for git commands
|
||||
- Git commands are shell commands and must be executed, not written to files
|
||||
|
||||
**Examples:**
|
||||
- User: "commit with message 'Fix bug'" → `exec(command="git commit -m 'Fix bug'")`
|
||||
- User: "commit the staged files" → `exec(command="git commit -m 'your message here'")`
|
||||
- User: "push to remote" → `exec(command="git push")`
|
||||
- User: "check git status" → `exec(command="git status")`
|
||||
|
||||
**WRONG (will not work):**
|
||||
- `write_file(path="git commit -m 'message'", content="...")` ❌
|
||||
- `edit_file(path="git commit", ...)` ❌
|
||||
|
||||
**CORRECT:**
|
||||
- `exec(command="git commit -m 'Fix HTTPS to HTTP conversion for Gitea API'")` ✅
|
||||
|
||||
## When NOT to Use Tools
|
||||
|
||||
**For simple acknowledgments, respond naturally and conversationally - no tools needed.**
|
||||
|
||||
Reference in New Issue
Block a user