跳到主要内容

git

使用 git 找回被 AI 改坏的代码、开发机有问题立刻切换运行机运行,何尝不是一种蓝绿部署

ssh 方式拉取仓库

  • ssh-keygen -t ed25519 -C "邮箱",全部选择回车
  • cat ~/.ssh/id_ed25519.pub,并复制公钥
  • github-头像-设置-SSH and GPG keys​​-​​New SSH key
  • title 填写标题,​​Key type​​ 默认 Authentication Key,key 粘贴公钥
  • ssh -T git@github.com,选择 yes
  • 出现信息即成功 Hi your_github_username!
  • git clone git@github.com:wwweibu/Lrobot.git

解决冲突

  • 忽略本地更改
  • git fetch --all && git reset --hard origin/master

触发更新

新建Lrobot\git\hooks\post-merge,写入以下内容,即可在 git pull 时更新所有模块

#!/bin/sh
find D:/your_project/logic/command -name "*.py" -exec touch {} +

提交格式

格式<类型>: <描述>

类型说明
feat新功能
fix修复 bug
docs文档变更
style代码格式调整
refactor重构(不新增功能、修复 bug)
perf性能优化
test添加或修改测试代码
build构建相关的变更
ciCI 配置、脚本变更
chore其他杂项变更
revert回滚某次提交

.gitignore文件说明

待开发完全后提交

  • /storage/yml/model.yaml

服务器密钥

  • /command/lrobot.pem

需要复制,用户自行配置

  • /secret.py 路径加密
  • /storage/yml/agent.yaml 代理配置
  • /storage/yml/secret.yaml 平台配置
  • /storage/yml/storage.yaml 临时存储
  • /storage/yml/user.yaml 用户组配置

数据存储,由系统自动生成

  • /storage/data/backup 备份数据
  • /storage/data/map 地图数据(网站首页备份)
  • /storage/data/mihomo/cache.db 代理数据
  • /storage/data/mihomo/config.yaml 代理数据
  • /storage/data/mongodb mongodb 数据库数据
  • /storage/data/mysql mysql 数据库数据
  • /storage/data/napcat napcat 系统数据

资源文件夹,由系统自动生成

  • /storage/file/recycle 网盘回收站的文件与预览文件
  • /storage/file/user 用户数据

Lrobot 指令/网盘等资源文件,需自行创建、添加

  • /storage/file/clouddrive 网盘内文件,可以运行后在 cab/file 中添加
  • /storage/file/resource 静态资源文件,由用户自己上传(前端有时需要图片如 wiki)
  • /storage/file/command/money.jpg 付款码
  • /storage/file/command/hunt 寻宝群二维码
  • /storage/file/command/record 群聊记录

PyCharm IDE 文件

  • /.idea