Short version
  1. Keep your file graph in a private Git repository and push it from your computer.
  2. In GitSync.md, allow all-files access and pick a device folder such as Documents/Logseq under Settings → Save new clones in.
  3. Clone the repository. It lands in <owner>/<repo> inside that folder.
  4. In Logseq, open that cloned folder itself, the one that contains pages, journals and logseq.
  5. Pull before you open Logseq. Commit and push after you close it.

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 says a DB graph can be persisted to a db.sqlite file and describes a DB Graph Importer that converts a file graph into one, and the Logseq README says the DB version is in beta. As of December 1, 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.

Three ways to use Git with Logseq on Android

Searches for this topic lead mostly to forum threads and community wikis. They describe three routes. Claims about other apps below come from the pages linked in the table; "not stated" means the page we checked doesn't say, not that the feature is missing.

Termux scriptsA general Git client (MGit and similar)GitSync.md
Terminal neededYes: the Logseq-Git-Sync-101 wiki's Android route is shell scriptsNo. MGit's F-Droid listing describes cloning, pushing and pulling in an appNo
SSHNot stated in the pages we checkedMGit: not stated in its listing. See the full comparison for other appsYes: a key made on the phone or imported, or an HTTPS token
Folder accessScripts work on a path you set; the wiki's changelog mentions ~/storage/sharedNot stated in the pages we checkedClones into a device folder you choose in shared storage
Conflict handlingYou resolve conflicts with Git commands in the shellNot stated in the pages we checkedStops and shows the conflict; keep either version or edit by hand
CostThe wiki is freeMGit is free on F-DroidFree to download; $9.99 one-time unlock on Google Play, after a free vault check

For more apps, with sources, see every Android Git client compared. The Termux route is a fair choice if you're comfortable in a shell and want to maintain scripts yourself. This guide uses GitSync.md, which is published by the same developer as this site.

What you need

  • A file graph on a computer, already a Git repository with a remote: GitHub, or another host (GitLab, Codeberg, Bitbucket, your own server). Make it private: a graph is personal notes.
  • Logseq for Android. See Logseq's download page and repository for the current release. We haven't verified here which store listing is official, so start from those.
  • GitSync.md from Google Play on Android 9 or later. The app is free to download, and a free vault check runs before you buy: for supported GitHub connections it reads the repository's metadata, such as size and file count, and downloads no notes. Full Access is $9.99 once in the US, with no subscription, and Google Play shows your local price. The Android guide describes the check in full; it mentions an .obsidian folder because it's written for Obsidian.
  • A credential for the remote. For GitHub, GitSync.md signs in through your browser or takes a token (the GitHub token generator helps). For any other host, use Any Git host with a token or SSH key.
  • A backup of the graph folder before you change how it syncs.

On your computer: commit and push the graph

The repository root should be the graph folder, the one that holds pages, journals and logseq. If the graph isn't in Git yet, run these in that folder. 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

Ignore device state and backups. Logseq keeps files besides your pages inside the graph folder. In Logseq's source, config.edn and custom.css are the graph's settings and style files under its logseq folder (config.cljs), so those belong in the repository. We couldn't verify the names of Logseq's backup folders (such as logseq/bak) or its recycle folder in Logseq's repository or docs, so we don't list them as fact. After a session in Logseq on your computer, run git status, add whatever backup or generated folders it shows to a .gitignore at the repo root, and add .DS_Store if you're on a Mac. The gitignore generator is built for Obsidian, so its presets don't apply here.

Commit on the computer too. Nothing in this setup commits for you by default, so commit and push on the computer after you edit there, and pull there before you edit after using the phone. We haven't verified Logseq desktop's own automatic-commit setting here, so this guide doesn't rely on it. If you use it, push and pull the same way.

Choose the device folder

Android storage is where this setup usually breaks, so here is the rule once. Git needs a real, writable folder with a hidden .git directory inside it. Logseq needs to be able to open that same folder. Android's shared storage, such as Documents, gives both apps one normal folder. A cloud provider does not: GitSync.md says "Cloud folders such as Google Drive can't hold a Git repository", and forum users report that Logseq on Android fails with "cannot support this directory type" when pointed at a Nextcloud folder (see troubleshooting). Android's all-files access is what lets GitSync.md write into shared storage. The storage section of the Android guide explains it in more depth.

The layout we suggest: make a Documents/Logseq folder and let GitSync.md create the repository's own folder inside it. The graph then lives at Documents/Logseq/<owner>/<repo>.

  1. In GitSync.md, open Settings → Save new clones in → Choose a device folder.
  2. The first time, the app shows Allow local folder access. Tap Enable access, turn on Allow access to manage all files, and go back.
  3. In Android's folder picker, create or pick Documents/Logseq, tap Use this folder, then Allow, then Use for new clones.
GitSync.md dialog titled Allow local folder access, explaining that shared storage access is needed for Git working copies in device folders, with Cancel and Enable access buttons
Allow folder access. GitSync.md sends you to Android Settings to turn on all-files access.
GitSync.md Save new clones in screen with the default set to /storage/emulated/0/Documents/Obsidian and a note that cloud folders such as Google Drive can't hold a Git repository
Pick a default folder. Settings → Save new clones in. This capture was taken with an Obsidian folder; choose Documents/Logseq instead.

Clone with GitSync.md

  1. Install GitSync.md from Google Play. On the first screen choose Continue with GitHub, or the option for another host, which opens Any Git host.
  2. For GitHub, go to Add a vault → Clone from GitHub and tap Clone next to the graph's repository. For another host, paste the remote URL on the Any Git host screen, choose SSH key, Token or None (public repositories), and tap Test & clone. The SSH setup is described in the Android guide.
  3. Let the vault check finish, then confirm. Nothing downloads until you confirm.

A GitHub clone lands in <owner>/<repository> inside your chosen folder, for example Documents/Logseq/me/my-graph. A clone by URL goes into a folder under custom/ with a generated name. To see the exact folder of each vault, open Settings → Save new clones in. For a clone by URL you can also choose a folder for that clone only under Clone location → Choose another folder.

GitSync.md Any Git host form with a sample HTTPS remote URL, sign-in choices SSH key, Token and None, and the clone location Documents / Obsidian
Review the location. Each clone shows its destination before anything downloads. The sample shows an Obsidian folder.

Open the graph in Logseq

In Logseq, add or open a graph from a local folder on the phone and pick the cloned folder itself, for example Documents/Logseq/me/my-graph. Choose the repository root, the folder that contains pages, journals and logseq, not its parent and not a folder inside it. We traced the GitSync.md side of this guide through the app and its existing Android guide, but we did not record Logseq for Android opening a folder, so there's no Logseq screenshot here and we don't quote Logseq's menu labels. If Logseq's wording differs, look for the option that opens a graph from a folder on the device.

Don't run another sync tool on this folder: Syncthing, FolderSync, Logseq's own sync or a cloud client will rewrite the same files Git is tracking and cause duplicate files and confusing conflicts.

Daily routine: pull, edit, push

  1. Pull before you open Logseq. In GitSync.md, open the vault and tap Pull, so you edit the latest copy.
  2. Edit in Logseq, then close it.
  3. Commit and push. Back in GitSync.md, the vault screen lists what changed. Tap Commit & push, choose the files, write a message and leave Push right after on.

The order matters because nothing here commits for you unless you opt in: Git only records changes when you commit in GitSync.md. If you edit before pulling, you may change a page that has already changed on the remote, and a later push is rejected.

Troubleshooting

Logseq says it can't support the directory

In a Logseq forum thread, a user reports the error "cannot support this directory type" on Android when selecting a Nextcloud folder, and concludes that Logseq on Android doesn't support WebDAV storage. That is a user report, not official documentation. The practical fix is the one above: clone into a normal folder in shared storage such as Documents/Logseq, not a cloud or provider folder. The same thread's workaround uses a folder-sync app; don't combine one with Git on the same folder.

"Please choose a valid directory"

The forum thread we found for this message, here, was about iPhone and iPad, where another forum user replies that the graph must sit inside Logseq's own folder, calling it an iOS restriction. That is a user report, not official documentation. We didn't find an Android report to cite, so on Android check that you picked a normal device folder and the repository root. iPhone readers: see the iPhone guide.

The graph is empty or shows no new pages after a pull

First check that you opened the repository root, the folder with pages, journals and logseq directly inside it. We haven't verified in Logseq's docs how it picks up files changed outside the app, so we don't give a refresh step; if the pages are still missing, check that GitSync.md's Pull finished and the files are in the folder.

Backup or cache files show up in commits

Run git status on the computer to see which folders change after a session, add them to .gitignore, and remove already tracked ones from the index once with git rm -r --cached <folder>; see git rm.

Push rejected

The remote has commits you don't. Pull first, then push. If both devices changed the same file, GitSync.md stops and shows the conflict; follow the conflict recovery guide, whose concepts apply to any Markdown files. To compare the two versions by hand, the Markdown diff tool helps with conflict markers. Don't force-push to clear the error.

FAQ

Does it sync in the background?

Optionally. GitSync.md has a Background Sync setting that can pull, and if you turn it on, commit and push; automatic commit and push is off by default. Android decides when it runs, in the app's words about every 15 minutes or later, best effort and never real time. Details are in the keep-it-in-sync section of the Android guide. A background pull while Logseq is open can change files under it, so pull by hand until both directions work.

Can I use GitLab, Codeberg or Bitbucket?

Yes. Use Any Git host with the remote URL and a token or SSH key. Provider notes: GitLab, Codeberg, Bitbucket. They're written for Obsidian, but the account and token steps are the same.

Does it work with DB graphs?

No. See file graphs only.

Do I need Termux?

No. GitSync.md does the Git operations in the app. Termux is an alternative if you want to maintain shell scripts.