620b27de6d
- Move hardware/firmware/ui_freenove_allinone → hardware/ui_freenove_allinone
- All UI hardware now at hardware/ root level
- Single coherent hardware structure complete
Structure now:
- hardware/firmware/ ← Code source
- hardware/ui_freenove_allinone/ ← UI at root level
- hardware/projects/ ← Secondary projects
- hardware/shared/libs/ ← Shared libraries
- hardware/{bom,enclosure,wiring}/ ← Reference docs
3.1 KiB
3.1 KiB
Quick Reference: Git Write Ops via Cockpit
🎯 One-Liner Commands
Basic Operations
# Enable write mode
export ZACUS_GIT_ALLOW_WRITE=1
# Stage all changes
./tools/dev/cockpit.sh git add .
# Commit with message
./tools/dev/cockpit.sh git commit -m "Your commit message"
# Stash changes
./tools/dev/cockpit.sh git stash save "description"
# Push to remote
./tools/dev/cockpit.sh git push origin main
CI/CD Automation (no prompts)
export ZACUS_GIT_ALLOW_WRITE=1
export ZACUS_GIT_NO_CONFIRM=1
./tools/dev/cockpit.sh git add .
./tools/dev/cockpit.sh git commit -m "Auto-commit"
./tools/dev/cockpit.sh git push origin main
With Evidence Tracking
source tools/dev/agent_utils.sh
evidence_init "my_phase"
export ZACUS_GIT_ALLOW_WRITE=1
export ZACUS_GIT_NO_CONFIRM=1
git_add .
git_commit -m "changes"
# All logged to: $EVIDENCE_COMMANDS
📖 Read Operations (no guards needed)
./tools/dev/cockpit.sh git status
./tools/dev/cockpit.sh git diff
./tools/dev/cockpit.sh git log 20
./tools/dev/cockpit.sh git branch
./tools/dev/cockpit.sh git show HEAD
🔒 Safeguard Errors
# Error: Missing ZACUS_GIT_ALLOW_WRITE
$ ./tools/dev/cockpit.sh git add .
[AGENT][FAIL] Git write operation requires ZACUS_GIT_ALLOW_WRITE=1
# Solution:
export ZACUS_GIT_ALLOW_WRITE=1
./tools/dev/cockpit.sh git add .
🧪 Test Examples
./tools/dev/examples_git_write_ops.sh 1 # Stage files
./tools/dev/examples_git_write_ops.sh 2 # Commit interactive
./tools/dev/examples_git_write_ops.sh 3 # Commit silent
./tools/dev/examples_git_write_ops.sh 4 # Stash
./tools/dev/examples_git_write_ops.sh 5 # Push
./tools/dev/examples_git_write_ops.sh 6 # With evidence
./tools/dev/examples_git_write_ops.sh 7 # Error demo
./tools/dev/examples_git_write_ops.sh 8 # Release pattern
📚 Full Documentation
- Main Guide:
docs/GIT_WRITE_OPS.md - Policy:
docs/TEST_SCRIPT_COORDINATOR.md#git-operations-policy - Registry:
docs/_generated/COCKPIT_COMMANDS.md - Implementation:
GIT_WRITE_OPS_IMPLEMENTATION.md
🚀 Key Points
- Always set:
export ZACUS_GIT_ALLOW_WRITE=1for write ops - Get prompted: By default (unless
ZACUS_GIT_NO_CONFIRM=1) - Check status:
./tools/dev/cockpit.sh git status - In scripts: Use
git_add(),git_commit(), etc. fromagent_utils.sh - Evidence: All commands auto-logged when evidence is initialized
💡 Pro Tips
- Use
git statusbefore committing to verify changes - Test with
ZACUS_GIT_NO_CONFIRM=1in isolated branch first - Review
docs/GIT_WRITE_OPS.mdfor full examples - Run
examples_git_write_ops.shto see all patterns - Check
EVIDENCE_COMMANDSfile after operations
🔗 Related Commands
# Other cockpit commands
./tools/dev/cockpit.sh rc # RC live gate
./tools/dev/cockpit.sh flash # Flash firmware
./tools/dev/cockpit.sh build # Build all
./tools/dev/cockpit.sh ports # Watch ports
# Git read operations
./tools/dev/cockpit.sh git log 10
./tools/dev/cockpit.sh git diff HEAD~1
./tools/dev/cockpit.sh git branch -vv