- Move the vault out of iCloud Drive (and out of Desktop and Documents if those folders sync).
- Put it under Git, push it to a private GitHub repository, and sign in once so the macOS Keychain remembers you.
- Clone the repository on your iPhone with GitSync.md into On My iPhone → Obsidian.
- Pull before you write, commit and push before you switch devices.
Yes, you can sync Obsidian between a Mac and an iPhone without iCloud: keep a normal folder on the Mac, use Git to push it to a private GitHub repository, and clone that repository on the iPhone. It is free apart from the phone app, and every change becomes a commit you can look back at. The catch is that syncing is manual: you pull and push instead of waiting for a service.
Already have your vault on GitHub? Skip to the iPhone steps. For the same setup on other desktops, see syncing Obsidian with GitHub on every device or the Windows and iPhone guide.
Details checked
Checked on December 3, 2026 against these sources:
- Obsidian: Sync your notes across devices
- Apple: Add your Desktop and Documents files to iCloud Drive
- GitHub Docs: Caching your GitHub credentials in Git, Creating a new repository and Adding locally hosted code to GitHub
- Git: Installing Git on macOS
- Obsidian Git plugin: its README
- macOS menu names change between versions. If a label differs on your Mac, search System Settings for it. The Mac steps use plain Git, not GitSync.md.
Is Git right for you?
- iCloud needs no commands and works across Apple devices, but it is the thing you are trying to leave. Obsidian and iCloud sync covers fixing it instead.
- Obsidian Sync is Obsidian’s paid service and needs no Git. See Obsidian Sync vs Git.
- Git gives you commit history and a remote you control, at the cost of pulling and pushing yourself. iCloud vs Git for Obsidian lays out the trade-offs.
What you need
- A Mac and an iPhone, with Obsidian on both.
- A free GitHub account.
- GitSync.md on iOS 17 or later. It is free to download; adding a vault needs a one-time $9.99 unlock on the US App Store, and local prices vary. (Readers who also have an Android phone can get it on Google Play.)
- A separate backup of your notes before you move folders or change sync methods.
The Mac commands below run in Terminal (zsh). GitSync.md does not run on the Mac: the Mac side is plain Git, plus the optional Obsidian Git plugin in step 6.
1. Get the vault out of iCloud on your Mac
Obsidian’s help says not to sync one vault with more than one service. On a Mac there is an easy way to break that rule by accident: if iCloud Drive syncs your Desktop and Documents folders, a vault in ~/Documents is already in iCloud, even if you think of it as “Git only”.
Check the setting
- Open System Settings, click your name at the top of the sidebar, then choose iCloud and Drive.
- Look for the Desktop & Documents Folders switch. If it is on, everything in Desktop and Documents is in iCloud Drive.
Apple explains what this setting moves and where the folders go when you turn it off. Read that before you switch it off, because it affects all your files in those folders, not just the vault.
Keep the vault somewhere else
The simplest fix is to leave the setting alone and keep the vault outside Desktop and Documents, for example ~/Obsidian/MyVault. Quit Obsidian, then move the folder:
mkdir -p ~/Obsidian
mv ~/Documents/MyVault ~/Obsidian/MyVault
Replace MyVault with your vault’s folder name. If the vault is in ~/Library/Mobile Documents/iCloud~md~obsidian/Documents (Obsidian’s own iCloud folder), copy it out instead of moving it, and check the copy before you delete anything. Then open Obsidian, choose Open folder as vault, and select ~/Obsidian/MyVault. If Obsidian still lists the old vault, remove it from the vault list so you do not edit the wrong copy.
2. Install Git on macOS
Check whether Git is already there:
git --version
If Git is missing, macOS offers to install the Xcode Command Line Tools. You can also start that yourself:
xcode-select --install
Homebrew is an alternative if you already use it: brew install git. You do not need it for this guide. See Installing Git on macOS. Then set your identity once:
git config --global user.name "YOUR_NAME"
git config --global user.email "YOUR_COMMIT_EMAIL"
Use the email you want in your commit history; a GitHub no-reply address works.
3. Create a private GitHub repository
On GitHub, create a new repository and set it to Private. Leave README, .gitignore and license off, because your vault already has its own files. See GitHub’s Creating a new repository. Private visibility restricts access; it is not encryption with a key only you hold.
4. Add a .gitignore, then make the first commit and push
Go to the vault folder and create the .gitignore before the first commit:
cd ~/Obsidian/MyVault
cat > .gitignore <<'EOF'
.DS_Store
.obsidian/workspace.json
.obsidian/workspace-mobile.json
.trash/
EOF
.DS_Store is a Finder file, and the two workspace files record which panes are open on each device, so they change constantly. .trash/ holds notes you deleted inside Obsidian. Other settings in .obsidian/ will be tracked, including plugins and themes; the Obsidian .gitignore guide explains the choice, and the .gitignore generator builds a file for you.
Initialise the repository, review what will be uploaded, and commit. Look for private files, tokens and large attachments before you push:
git init
git add .
git status
git commit -m "Add vault notes"
git branch -M main
Now connect the remote and push. Replace YOUR_ACCOUNT and YOUR_REPOSITORY:
git remote add origin https://github.com/YOUR_ACCOUNT/YOUR_REPOSITORY.git
git push -u origin main
If Git asks you to sign in, do step 5 first, then repeat the push. GitHub documents these commands in Adding locally hosted code to GitHub.
5. Sign in once so it sticks
GitHub no longer accepts your account password for Git over HTTPS, and you should not paste a token into the remote URL, because it ends up in plain text in .git/config. GitHub’s Caching your GitHub credentials in Git recommends GitHub CLI or Git Credential Manager. On a Mac, credentials are stored in the macOS Keychain.
GitHub CLI: install it with Homebrew, then sign in over HTTPS:
brew install gh
gh auth login
Choose GitHub.com, HTTPS, and say yes when asked to authenticate Git with your GitHub credentials. Finish in the browser. Git Credential Manager is the other option; GitHub’s page above has its macOS install steps. Once you are signed in, run git push -u origin main again if the first push failed, and confirm the notes appear on GitHub.
6. Optional: Obsidian Git plugin on the Mac
If you do not want to type Git commands every day, the Obsidian Git community plugin can commit and push on an interval. Set it up on the Mac only; the Obsidian Git plugin reference lists the settings. The plugin’s README describes mobile support as experimental, so use GitSync.md on the iPhone instead. If a phone sync fails, see Obsidian Git not working on iPhone.
7. Clone to your iPhone with GitSync.md
- Install and open Obsidian on the iPhone. If you have no vault there yet, create a local one first so Obsidian’s folder appears under On My iPhone. Leave Store in iCloud off.
- Open GitSync.md, sign in to GitHub, and choose On My iPhone → Obsidian as the save location, so Obsidian sees the clone as a vault.
- Add your private repository and clone it.
- In Obsidian, open the cloned folder as a vault. Fully close and reopen Obsidian if it does not appear.
- In GitSync.md, check the branch is
main, matching the Mac.
The full iPhone setup guide covers folder selection in more detail. Get GitSync.md for iPhone and iPad →
8. Verify sync both ways
- On the Mac, create a note called “Sync test” in Obsidian. Then commit and push it:
cd ~/Obsidian/MyVault git add . git commit -m "Add sync test note" git push - On the iPhone, open the repository in GitSync.md and pull. Open Obsidian and confirm the note is there.
- Edit the note on the iPhone. In GitSync.md, review the diff, commit and push.
- On the Mac, pull and confirm the edit shows in Obsidian:
cd ~/Obsidian/MyVault git pull --ff-only
This shows that your own setup transfers changes both ways. Do it before you rely on it with real notes.
Daily routine and avoiding conflicts
Pull first, push last. Before you write on a device, pull. When you finish, commit and push before you pick up the other device. On the Mac:
git pull --ff-only
# ...write in Obsidian...
git add .
git commit -m "Update notes from Mac"
git push
If Git says there is nothing to commit, skip the last two commands. git pull --ff-only stops instead of merging when the two copies have diverged. Do not force-push or delete the vault; follow the merge conflict checklist.
GitSync.md also offers optional Background Sync and Apple Shortcuts. Background work is best effort and scheduled by iOS, so keep the manual routine as your baseline. See Background Sync on iPhone and Shortcuts automation.
Troubleshooting
The vault is still syncing through iCloud
Run pwd in the vault folder. If the path contains Documents, Desktop or Mobile Documents, iCloud may still be syncing it. Move it as in step 1. On the iPhone, check that Obsidian’s Store in iCloud is off. Obsidian iCloud sync problems covers the iCloud side.
Authentication failed
Git over HTTPS needs a token or a credential helper, not your account password. Run gh auth status to check CLI sign-in. If you use a personal access token on the iPhone, make sure it can read and write that repository; the GitHub token generator explains scopes.
.DS_Store shows up in commits
An ignore rule does not affect files Git already tracks. Remove it from the index once, then commit:
git rm -r --cached --ignore-unmatch .DS_Store
git commit -m "Stop tracking .DS_Store"
This only fixes .DS_Store files at the vault root. If they were committed in subfolders, run the same command with the path to each file.
Large attachments
Check attachment sizes before the first push. For big images, audio or PDFs, read Git LFS on iPhone first.
The vault does not show up in Obsidian on the iPhone
Make sure you cloned into On My iPhone → Obsidian, then open the folder as a vault and restart Obsidian. See where Obsidian stores vaults on iPhone.
FAQ
Is it free?
Git and a GitHub account with private repositories are free. GitSync.md is free to download, with a one-time $9.99 unlock on iPhone and iPad and no subscription.
Is my vault private?
A private repository is visible only to people you give access. It is not end-to-end encrypted, and Git history keeps earlier versions of deleted notes.
Can I add an iPad?
Yes. Clone the same repository on the iPad under On My iPad and use the same routine. See Git on iPad.
Will plugins and themes sync?
With the .gitignore above, only the two workspace files are excluded, so the rest of .obsidian/ is tracked and plugin settings travel with the vault. Some plugins store private data, so review before you push. Mobile-only or desktop-only plugins may not work on both devices. To keep settings per device, add .obsidian/ to the .gitignore.
Can I use GitLab or Codeberg instead?
Yes. Git works with any remote. See Obsidian with GitLab and Obsidian with Codeberg.
