Install
openclaw skills install git-version-controlGit-based version control for OpenClaw system configuration changes. Provides two core capabilities: (1) SAVE - Create a checkpoint before sensitive operations (git add & commit) (2) ROLLBACK - Revert to a previous state if issues occur (git reset) Use when: - Before making sensitive configuration changes - Before installing/removing skills - Before modifying core files (SOUL.md, AGENTS.md, MEMORY.md, etc.) - User requests to undo recent changes - System state needs recovery after errors
openclaw skills install git-version-controlProtect your OpenClaw environment with git-based checkpoints and rollback capability.
OpenClaw configuration directory (~/.openclaw/) is a git repository. This skill provides safe version control for system configuration changes.
Protected files include:
workspace/SOUL.md, AGENTS.md, USER.md, IDENTITY.mdworkspace/skills/ - installed skillsworkspace/memory/ - memory filesopenclaw.json - main configurationcron/jobs.json - cron jobsExcluded from version control:
*.jsonl, *.jsonl.lock)*.sqlite)Create a git commit before making sensitive changes. This provides a recovery point.
When to use:
Command Flow:
cd ~/.openclaw
# Check current status
git status
# Add all tracked files (respecting .gitignore)
git add -A
# Create commit with descriptive message
git commit -m "checkpoint: {description of pending change}"
Implementation:
When user says: "save before..." or "create checkpoint"
1. Generate descriptive commit message based on context
2. Run: git add -A
3. Run: git commit -m "checkpoint: {description}"
4. Report commit hash and file count to user
Example:
User: "Save before I install a new skill"
Action:
git add -A
git commit -m "checkpoint: before installing new skill"
Output: "✓ Checkpoint created: abc1234 (5 files changed)"
Revert to a previous commit when issues occur.
When to use:
Rollback Options:
| Option | Command | Effect |
|---|---|---|
| Soft reset | git reset --soft HEAD~1 | Undo commit, keep changes staged |
| Mixed reset | git reset --mixed HEAD~1 | Undo commit, keep changes unstaged |
| Hard reset | git reset --hard HEAD~1 | Completely undo commit and changes |
Recommended default: --hard for full rollback
Implementation:
When user says: "rollback" or "undo last change" or "restore previous"
1. Show recent commits for user to choose
git log --oneline -10
2. Confirm which commit to restore to
"Rollback to commit X? This will discard: {list changes}"
3. Execute rollback
git reset --hard {commit-hash}
4. Report result
"✓ Rolled back to commit abc1234"
Example:
User: "Rollback to before the skill installation"
Action:
git log --oneline -5
# Show: abc1234 checkpoint: before skill install
# def5678 previous config
git reset --hard abc1234
Output: "✓ Rolled back to 'before skill install' (abc1234)"
# Show recent commits
git log --oneline -10
# Show what changed in last commit
git show --stat HEAD
# Compare current state to last commit
git diff HEAD
# See uncommitted changes
git status
# See diff summary
git diff --stat
Files tracked for version control (in git):
git ls-files
Ensure ~/.openclaw/.gitignore excludes volatile/sensitive files:
# Session logs (volatile)
*.jsonl
*.jsonl.lock
*.jsonl.reset.*
# Databases (volatile)
*.sqlite
*.sqlite-journal
# Credentials (sensitive)
credentials/
*.pem
*.key
# Temporary files
*.tmp
*.temp
.DS_Store
# Logs
logs/
# Delivery queue
delivery-queue/
User requests sensitive operation
↓
Is SAVE needed?
┌─────┴─────┐
Yes No
↓ ↓
SAVE first Execute directly
↓
Execute operation
↓
Success?
┌─────┴─────┐
Yes No
↓ ↓
Done ROLLBACK?
┌─────┴─────┐
Yes No
↓ ↓
Rollback Debug manually
| Skill | Integration |
|---|---|
| self-improvement | Record rollback events as learnings |
| skill-creator | Auto-SAVE before creating new skills |
| healthcheck | Check git status during health checks |
Always SAVE before risky operations
Use descriptive commit messages
checkpoint: before installing news skill
checkpoint: before modifying SOUL.md persona
checkpoint: before cron job changes
Verify before ROLLBACK
Don't rollback without confirmation
Don't commit sensitive data
credentials/ to gitDon't use for session data
| Action | Command | Alias |
|---|---|---|
| SAVE checkpoint | git add -A && git commit -m "checkpoint: {desc}" | save |
| ROLLBACK | git reset --hard HEAD~1 | rollback |
| View history | git log --oneline -10 | history |
| Check status | git status | status |
| Compare diff | git diff HEAD | diff |
User: Install a new skill from ClawHub
Agent (internal):
1. SAVE checkpoint first
$ git add -A
$ git commit -m "checkpoint: before installing {skill-name}"
✓ Checkpoint: abc1234
2. Install skill
$ clawhub install {skill-name}
3. Verify success
✓ Skill installed successfully
User: That skill broke something, rollback!
Agent:
1. Show options
$ git log --oneline -3
abc1234 checkpoint: before installing {skill-name}
def5678 previous state
2. Confirm rollback
"Rollback to abc1234? This will remove the newly installed skill."
3. Execute
$ git reset --hard abc1234
✓ Rolled back successfully
Last updated: 2026-03-05