Short version
  1. Keep your file graph in a Git repository and push it from your computer.
  2. Open Logseq on the phone once so On My iPhone → Logseq exists.
  3. In GitSync.md, clone the repository into that folder with Clone To and Choose a different location.
  4. In Logseq, add the graph and pick the cloned folder, the one that contains pages, journals and logseq.
  5. Pull before you open the graph. Push when you're done.

This guide covers file graphs only

A Logseq file graph is a folder of Markdown (or Org-mode) files on disk, which is what Git tracks well. Logseq's newer DB graphs are a different format. Logseq's DB version documentation shows a DB graph stored as a SQLite file (db.sqlite) and describes a separate importer for converting Markdown files into one, and the Logseq README says the DB version is in beta. As of November 30, 2026, a DB graph isn't a folder of Markdown pages, so the steps below don't apply to it. Check those two pages for the current status before you migrate.

If you're unsure which you have: a file graph has pages and journals folders full of .md files. The desktop .gitignore and commit steps below only make sense for that layout.

What you need

  • A file graph that is already a Git repository with a remote: GitHub, GitLab, Codeberg, Bitbucket or a self-hosted server.
  • Logseq for iOS from the App Store.
  • GitSync.md on an iPhone or iPad with iOS or iPadOS 17 or later. It's free to download; adding a vault needs a one-time $9.99 unlock on the US App Store, and local prices vary.
  • A credential for the remote. For HTTPS, make a token (for GitHub, the GitHub token generator helps); for SSH, see the SSH guide. Provider notes: GitLab, Codeberg, Bitbucket. They're written for Obsidian, but the account and token steps are the same.

On your computer: commit and push the graph

If the graph isn't in Git yet, run these in the graph folder (the one that holds pages and journals). The commands are standard Git; see the Git documentation.

git init
git add .
git commit -m "Initial commit"
git branch -M main
git remote add origin https://example.com/YOU/my-graph.git
git push -u origin main

Use a private repository: a graph is personal notes. Replace the URL with your own.

Ignore device state. Logseq keeps files besides your pages inside the graph folder, and some of them change per device or are backups you don't want in history. Run git status after a session in Logseq, decide which folders are generated state or backups, and list them in a .gitignore at the repo root before the first push. We haven't checked Logseq's folder names against a current desktop build for this guide, so use what git status shows rather than copying a list. The gitignore generator is built for Obsidian, so its presets don't apply here; write these rules by hand.

Keep one writer at a time. Logseq's desktop app can commit automatically, but this guide doesn't cover its setting because we couldn't verify the menu labels against a current build. The simple, safe rule is that any commit made on the computer must be pushed before you pull on the phone, and a phone commit pushed before you open the graph on the computer. If you use automatic commits on desktop, pull first on every device that has been used since.

On the phone: make sure the Logseq folder exists

Logseq on iOS can only open graphs from On My iPhone → Logseq or iCloud Drive → Logseq, including new subfolders inside them. A Logseq staff reply in this forum thread says other folders, such as Downloads or another app's storage, give "Please choose a valid directory". This is a user-forum report, not official documentation.

Open Logseq once and create or select a local graph, then look in the Files app. Forum users report that the Logseq folder can be missing from On My iPhone in some cases, with no confirmed fix in that thread. On an iPad, the equivalent is On My iPad.

Choose the local folder, not iCloud Drive. A Git working copy holds a hidden .git folder as well as your notes, and iCloud syncs files on its own schedule rather than as one repository. See iCloud vs Git for the general reasons. The forum poster in the thread above also calls Git "very buggy" on iCloud.

Clone with GitSync.md

  1. In GitSync.md, tap + (Add vault). Pick your repository from your signed-in account, or paste its clone URL under Or paste a URL.
  2. Choose the authentication method that matches the remote: your account, an HTTPS token, or an SSH key.
  3. Under Clone To, tap Choose a different location and pick On My iPhone → Logseq as the parent folder. GitSync.md creates the repository's folder inside it.
  4. Tap Check & clone and wait for it to finish.

More detail, including the access checks: clone a repository on iPhone. We traced these steps through the app's source and the existing guides rather than recording a Logseq walkthrough on a device, so this guide has no Logseq screenshots.

Open the graph in Logseq

In Logseq, add a graph and select the folder GitSync.md just created. Choose the repository root, the folder that contains pages, journals and logseq, not a folder inside it. If pages are missing after it opens, check that level first.

Daily routine: pull, edit, push

  1. Pull first. Open GitSync.md and pull before you open Logseq, so you edit the latest copy.
  2. Edit in Logseq. Switch back to GitSync.md when you're done.
  3. Commit and push. Review the changed files, write a message and use Commit & Push.

A pull that brings changes rewrites files on disk. If pages look stale afterward, fully close and reopen Logseq.

To make the pull and push one tap, use Shortcuts automation. iOS limits what can run in the background, so don't expect a sync while the app is closed: see background sync on iPhone.

Troubleshooting

"Please choose a valid directory"

The folder you picked is outside On My iPhone → Logseq or iCloud Drive → Logseq. Re-clone into the Logseq folder as above, or move the cloned folder there in the Files app.

The Logseq folder is missing in Files

Open Logseq and create a local graph, then check again in the Files app. If it still doesn't appear, the forum thread above is an unresolved report; the iCloud Drive → Logseq folder is the only other place Logseq accepts, with the Git drawbacks above.

The graph opens empty

You probably selected a folder above or below the repository root. Select the folder that has pages, journals and logseq directly inside it.

Push rejected

The remote has commits you don't. Pull first, then push. If both devices changed the same file, follow the conflict recovery guide; the steps are the same for Markdown files in any app. Don't force-push to clear the error.

Conflicting journal pages

Each day's journal is one file, so writing in today's journal on two devices without a pull in between edits the same file twice. Git can often merge different lines, but not always. Pull before you start, push when you finish, and resolve any conflict in the file before reopening it in Logseq.

Working Copy or GitSync.md

The community Logseq-Git-Sync-101 wiki has a page for iOS and iPadOS users on Working Copy, and a forum reply in the thread above says Working Copy reportedly works well with Logseq. Both are native Git clients that keep a local repository and give access through Files. The difference that matters here is where the working copy lives: with GitSync.md you clone directly into the Logseq folder as above. For features, price and push rules, read the comparison of Git clients for iPhone and iPad, which has sources.

FAQ

Does this work on Android?

On Android? Follow Sync a Logseq graph with Git on Android. GitSync.md is also on Google Play, but Android's folder access differs from the iOS steps here. See Git on Android for folder access.

Does it work with DB graphs?

No. See file graphs only.

Can I use iCloud instead?

Logseq opens graphs in iCloud Drive → Logseq, but a Git working copy there is a poor fit; see the folder section and iCloud vs Git.

Related guides