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 | 构建相关的变更 |
| ci | CI 配置、脚本变更 |
| 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/mongodbmongodb 数据库数据/storage/data/mysqlmysql 数据库数据/storage/data/napcatnapcat 系统数据
资源文件夹,由系统自动生成
/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