先備知識
Linux and Mac OS X

安裝 git
Mac OS X (透過 Homebrew)
1brew install gitLinux (Debian/Ubuntu)
1sudo apt-get install gitClone the repository
進入存放
repository的folder1cd ~/repositoriesclone
1git clone https://github.com/{your_username}/{your_repository}在
Obsidian開啟vault,並選則該repository
Android

安裝Termux
更新
pkg資料庫 && 升級已安裝軟體pkg update && pkg upgrade -y安裝
git的client端pkg install git給
Termux訪問儲存空間的權限termux-setup-storage進入
shared目錄cd /storage/shared創建
Obsidian使用的目錄並進入mkdir obsidian cd obsidianClone the repository
因為在
android手機上打字不那麼方便,我會將token存在~/.git-credentials.下次git pull就不用再輸入一次.注意 : ~/.git-credentials 會以明文儲存,確保你沒有給你的 token 太大的權限
git config --global credential.helper storegit clone
git clone https://github.com/{your_username}/{your_repository}Push && Pull
因為已經儲存
github token了,pull跟push時不用再輸入一次username跟passwordgit pullPush
git push在
Obsidian開啟vault