Add Claude Code hooks for auto-commit on session end
- Automatically commits and pushes changes when Claude Code session ends - Only triggers if there are uncommitted changes - Includes timestamp in commit message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
10
.claude/settings.json
Normal file
10
.claude/settings.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"hooks": {
|
||||||
|
"stop": [
|
||||||
|
{
|
||||||
|
"matcher": "",
|
||||||
|
"command": "if git -C /home/kavren/proxmox-infra status --porcelain | grep -q .; then git -C /home/kavren/proxmox-infra add -A && git -C /home/kavren/proxmox-infra commit -m \"Auto-commit: $(date '+%Y-%m-%d %H:%M') session changes\" && git -C /home/kavren/proxmox-infra push; fi"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user