Skip to content

Instantly share code, notes, and snippets.

@jeromeabel
Last active September 29, 2025 17:39
Show Gist options
  • Select an option

  • Save jeromeabel/918a1a77585bdfe3a832194349463dc2 to your computer and use it in GitHub Desktop.

Select an option

Save jeromeabel/918a1a77585bdfe3a832194349463dc2 to your computer and use it in GitHub Desktop.

Use Case

I want to use Obsidian on my mobile device and share data with my Obsidian folder from my desktop computer

Desktop: Use Git For Backup

  1. Create a Github Repository
  2. Create a Token: Github.com > Settings > developer settings > Personal Token > Generate token classic (90days/Repo full control). Find a way to send it temporarily from your desktop to your mobile. You will need it after.
  3. Clone on Desktop or add origin
mkdir repo
cd repo
(if already exists: clean remote) git remote remove origin https
git remote add origin git@github.com/<username>/<repo.git>
(if repo is not empty) git pull
  1. Open Obsidian and install Obsidian Git Plugin + enable
  2. Obsidian Git Plugin Settings > Vault backup interval 5 minutes
  3. Add ignore rules nano .gitgnore:
.obsidian/plugins/obsidian-git/data.json
.obsidian/app.json
.obsidian/appearance.json
.obsidian/hotkeys.json
.obsidian/workspace
  1. Command palette: commit all changes + push

[!Desktop Rules]

  • Backup interval: 5 or 10 min
  • Startup: Pull

Mobile: Use Git (Android ?)

  1. Install Termux App
  2. Give Termux access to your storage using the following command: termux-setup-storage
  3. pkg update && pkg upgrade
  4. pkg install git
  5. pwd: /data/data/com.termux/files/home/storage/downloads
  6. cd shared (shared folders destination for all apps)
  7. git clone git@github.com/<username>/<repo.git>
  8. username + password (= paste token)

Mobile: Use Obsidian

  1. Install Obsidian app
  2. Open Default Vault from "downloads/repo"
  3. Enable Community plugins
  4. Set Credentials in Obsidian Git Plugins (Author informations): paste the token into the password field

[!Mobile Rules]

  • Manual backup: Commit+Push
  • Startup: Pull
  • Don't forget: you will need to update the Github Token after 90days

Alternatives

  • SyncThing
  • FolderSync

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment