#!/bin/bash # 同步项目变动到 Gitea 仓库 # 用法: bash sync-to-gitea.sh "提交信息" cd /home/ubuntu/wechat-research-report MSG="${1:-自动同步更新}" git add -A git diff --cached --quiet && echo "没有需要提交的变动" && exit 0 git commit -m "$MSG" git push gitea main echo "✅ 已成功同步到 Gitea: https://git.hk.hao.work/hao/wechat-mp-research"