21 lines
544 B
Bash
Executable File
21 lines
544 B
Bash
Executable File
#!/bin/bash
|
||
set -e
|
||
|
||
# 进入workspace目录
|
||
cd /root/.openclaw/workspace-xiaoban
|
||
|
||
# 配置git信息
|
||
git config user.name "xiaoban"
|
||
git config user.email "xiaoban@valavala.com"
|
||
|
||
# 添加所有文件,自动排除.gitignore里的内容(包括secrets.md)
|
||
git add .
|
||
|
||
# 提交变更
|
||
COMMIT_MSG="自动备份 $(date +'%Y-%m-%d %H:%M:%S')"
|
||
git commit -m "$COMMIT_MSG" || echo "无变更需要提交"
|
||
|
||
# 推送到远程仓库
|
||
git push https://git.valavala.com/ai_member_only/ai_member_xiaoban master
|
||
|
||
echo "✅ Workspace备份完成:$COMMIT_MSG" |