# git_obsdian **Repository Path**: zh-five/git_obsdian ## Basic Information - **Project Name**: git_obsdian - **Description**: ios下利用git同步obsid笔记的方案 - **Primary Language**: Shell - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-23 - **Last Updated**: 2024-11-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 在 ios 上利用 a-shell app 使用 git 同步 obsdian 笔记 # a-Shell 介绍 a-Shell 适用于 iOS 的本地 Unix 终端。可在手机上本地运行 Python、JavaScript、sh 和所有 Unix 命令,无需网络连接。 与快捷方式结合使用时功能强大。[a-Shell](https://apps.apple.com/us/app/a-shell/id1473805438) 是完整版。如果您需要更小的应用程序,并且不需要 C 编译器、TeX 引擎或 numpy 和 matplotlib,那么可以使用 [a-Shell mini](https://apps.apple.com/us/app/a-shell-mini/id1543537943?platform=iphone)。 本方案使用 mini 足够了 # 方案依赖的app 本方案需要依赖多个app相互协程,请先确认已经安装了以下app: 快捷指令,文件,a-Shell,obsidian ![alt text](image.png) # 方案步骤 启动a-Shell,执行以下命令 ```sh # 切换到主目录 cd # 生成ssh key ssh-keygen -t ed25519 -f "./.ssh/id_ed25519" -C "a-shell@ios" -q -N "" # 拷贝公钥到配置到 gitee 或其它git仓库 cat ~/.ssh/id_ed25519.pub # 配置 git echo "alias git='lg2'" > .profile curl https://gitee.com/zh-five/git_obsdian/raw/master/.gitconfig > ./.gitconfig curl https://gitee.com/zh-five/git_obsdian/raw/master/git_sync.sh > ./git_sync.sh # 执行以下命令,在弹出框里选择 obsidian 的 ob 文件夹 pickFolder # clone git 仓库到本地,注意更换为你笔记的仓库地址 git init . git remote add origin git@gitee.com:{xxx}/ob.git git pull ```