360 Secure SkillHub
360 安全技能中心

gitbackup

核心功能:生成自包含的Git bundle备份,存储于/root/.openclaw/backups,文件名含UTC时间戳,输出备份路径与大小;若工作区非Git仓库会报错,不删除旧备份。典型场景:在Telegram执行/gitbackup命令,或用户要求备份Git历史/引用到本地文件。

trumppo
trumppo
热度 51.32
最近更新 2026-05-11 15:54:46
分类:开发依赖:代码执行应用场景:DevOps

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add gitbackup
Metadata
name
gitbackup
description
Create a local Git bundle backup of the OpenClaw workspace repository. Use when running /gitbackup in Telegram or when the user asks to back up Git history/refs to a local file.

Git Backup (local bundle)

Overview

Create a self-contained Git bundle of the workspace repo and store it in /root/.openclaw/backups.

Quick start

Run the bundled script:

bash /root/.openclaw/workspace/skills/gitbackup/scripts/git-backup.sh

Output

Print the bundle path and size. The bundle filename includes UTC timestamp.

Notes

  • If the workspace is not a Git repo, exit with a clear error.
  • Do not delete older bundles.