-
Notifications
You must be signed in to change notification settings - Fork 0
Sync Obsidian with GitHub on iOS
Tip
Open this guide on your iOS device and another screen for a better experience
There are some apps on iOS that allow us to have a Git repo on the device. However, most of those apps are not free or have limited functionality. At the end of this guide, you will learn how to sync your Obsidian vault with GitHub on your device for free.
It's fine if your repo is new, or if it already has the .obsidian directory with some files. Just add these lines to the .gitignore file:
.obsidian/community-plugins.json
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.obsidian/plugins/*/main.js
.obsidian/plugins/*/manifest.json
.obsidian/plugins/*/styles.css
.obsidian/themes/*/manifest.json
.obsidian/themes/*/theme.css
.trash
.DS_StoreNote
For the sake of this guide, the name of the vault is my-vault.
- Download Obsidian from the App Store.
- Open Obsidian app, tap on "Create a vault" -> "Continue without sync", and give any name to your vault.ℹ️ This automatically creates a new directory with the name of your vault and a sub-directory:
.obsidian.
-
Download iSH Shell from the App Store.
-
Open iSH Shell app and install Git by running the following command:
apk add git -
Make a new directory (The name can be different from your vault)
mkdir my-vault -
Change the current directory to the one you just created
cd my-vault -
Connect the Obsidian vault with your repository. This command will open Finder to select a directory.
⚠️ The two. .are important.mount -t ios-unsafe . . -
In the Locations section, select On my iPhone/iPad then the Obsidian directory, and finally
my-vault.⚠️ Before tapping on Open at the top right, be sure you see “Folder is Empty” -
Remove the
.obsidiandirectory.rm -r .obsidian -
Generate an access token. (See GitHub access tokens on a new tab for more details)
-
Clone your repository in the current directory. Replace
<token>with the GitHub token you generated.⚠️ Don't forget to add the.at the end.git clone https://<token>@github.com/<username>/<repo>.git . -
Mark the repo as safe. Be sure to use the absolute path
git config --global --add safe.directory /root/my-vault -
Set your name
git config user.name "Your Name" -
Set your email
git config user.email "your_email@example.com"
- Open Obsidian app, go to the Settings by tapping on the top left button to show the left sidebar, and then tap on the gear ⚙️.
- Enable the community plugins by tapping "Community plugins" in the settings, and then on "Turn on community plugins" button.
- Look for the Git plugin by Vinzent, by tapping on Browse, and then typing "Git" on the Search community plugins... text box.
- Tap Install, and then Enable.
Create a note on your device, then
- Open the Obsidian menu by hiding the keyboard and then tap on the the button with three lines at the bottom right.
- Tap on Open Git Source control to see the modified files.
- Click on the arrow-up button to commit and sync your changes.
TODO
If you see your file created from your device on your repo, congratulations, now your vault is synced with Git on your iOS device. For more details about how to use the Git plugin, check the Git plugin documentation
Restart iSH, then reconnect the Obsidian vault directory again with your Git directory again:
mount -t ios-unsafe . .
Unfortunately this works only during the current terminal session. I wish I can find a better solution for this issue.
If you see "Resource busy" while you are moving or deleting your git repo, probably your repo is still connected with your Obsidian vault. You need to disconnect them first, and then try again
umount my-vault
- Sync-Obsidian-with-GitHub-on-iOS
- Obsidian-community-plugins
- Optimizing-Novel-Word-Count-Plugin-for-Git-Users
- What is TypeScript, and why you should use it
- Quick setup
- Inference and type annotations
- Fundamental Types
- Object Types
- Union Types
- Type Aliases and Interfaces
- Type Assertions
- Literal Types
- null and undefined
- Narrowing
- Creating Types from Types
- Common Built‐in and Utility Types
- tsc CLI ‐ (The Compiler)
- Avoid using Object or {}
- Ignoring TypeScript errors
- TypeScript resources