Git configuration

Hello, I am working on automatic synchronisation from my Desktop Logseq 0.10.6 to git (GitHub account, although will move to Bitbucket and perhaps to blockchain Gitopia or Radicle soon?).
I have followed video1, video2 and video3, which I consider useful. Unfortunately, they are 1-2 years old, so the latest Logseq may have a smoother setup?

I’ve also downloaded the plugin Git, however I fail to see where I can configure settings for manual git syncs and then ultimately automatic git syncs?
I have a Github account with a repository names Logseq.
This desktop has a directory created in ~/Documents/Logseq.
I ran the Terminal command from Desktop:~/Documents/Logseq$ git clone https://github.com/githubUserName/Logseq.git.
I now have the directories and files ~/Documents/Logseq/Logseq/README.md.

I managed to create a new graph which seems to have created ~/Documents/Logseq/Logseq/journals logseq pages README.md.
Journals shows 2024_02_11.md with test data I entered into the GUI Logseq page.

I’m currently receiving the Logseq error: The current repository is not synchronised with the remote repository, please check.

I followed this guide Logseq-Git-Sync-101 by CharlesChiuGit and For Linux (Linux Mint) users (apparently same as For macOS users).
Unfortunately, step 7., Linux Mint doesn’t show a post-commit and pre-commit in .git/hooks?

linuxmint@linuxmint:~/Documents/Logseq/Logseq/.git/hooks$ ls -al
total 68
drwxrwxr-x 2 linuxmint linuxmint 4096 Feb 11 17:16 .
drwxrwxr-x 8 linuxmint linuxmint 4096 Feb 12 13:40 ..
-rwxrwxr-x 1 linuxmint linuxmint  478 Feb 11 17:16 applypatch-msg.sample
-rwxrwxr-x 1 linuxmint linuxmint  896 Feb 11 17:16 commit-msg.sample
-rwxrwxr-x 1 linuxmint linuxmint 4655 Feb 11 17:16 fsmonitor-watchman.sample
-rwxrwxr-x 1 linuxmint linuxmint  189 Feb 11 17:16 post-update.sample
-rwxrwxr-x 1 linuxmint linuxmint  424 Feb 11 17:16 pre-applypatch.sample
-rwxrwxr-x 1 linuxmint linuxmint 1643 Feb 11 17:16 pre-commit.sample
-rwxrwxr-x 1 linuxmint linuxmint  416 Feb 11 17:16 pre-merge-commit.sample
-rwxrwxr-x 1 linuxmint linuxmint 1492 Feb 11 17:16 prepare-commit-msg.sample
-rwxrwxr-x 1 linuxmint linuxmint 1374 Feb 11 17:16 pre-push.sample
-rwxrwxr-x 1 linuxmint linuxmint 4898 Feb 11 17:16 pre-rebase.sample
-rwxrwxr-x 1 linuxmint linuxmint  544 Feb 11 17:16 pre-receive.sample
-rwxrwxr-x 1 linuxmint linuxmint 2783 Feb 11 17:16 push-to-checkout.sample
-rwxrwxr-x 1 linuxmint linuxmint 3650 Feb 11 17:16 update.sample

Fixed this by downloading the post-commit and pre-commit files. The instructions are helpful, but ambiguous so I’ve noted clearer instructions, I might post once I’ve finalised the process.

Now, I’m a bit confused with Logseq’s file structure, locations and management on the Desktop and Phone. Creating a New Graph and Re-indexing a Graph sets the path somewhere, but I need to be crystal clear so I can setup git sync on the Desktop and Phone. I noted these path locations and in my confusion I’ve messed the data up with nested directories etc.

Desktop:

~/.logseq

~/.config/Logseq

Also Home/Pictures/Screenshots

Phone:

Phone → Files app → Browse → Locations → iCloud Drive → Logseq → test directory → journals, logseq and pages.

Phone → Files app → Browse → Locations → On My iPhone → Logseq → journals, logseq, Logseq and pages.

Logseq → journals, logseq, pages, README.

It seems you cloned on the iPhone into a subdirectory of an existing Logseq graph. This is why you have Logseq twice I guess. I’d remove the “outer” directories logseq (lower case!), pages and journals.

On Desktop your Logseq graph is usually not (and shouldn’t be IMHO) in one of the hidden folders you mention. Having it in Screenshots is of course possible but I’d use a different directory such as ~/Documents/Logseq or similar.

Hope this clarifies the directory question.

Hi,

Just published the following maybe it can help you with Android Synching?: How to clone and synchronise a GitHub repository on Android

I am currently testing Syncthing and am quite happy although I need to see the drain on the Android devices. I hope to get round to publishing my observations.

As an alternative to using git for syncing, please consider Syncthing.

I am syncing with Syncthing between MacBook and iPhone (previously Android). On iPhone I am using Möbius Sync and it is working well. You need to pay for Möbius Sync in order to be able to sync folders outside of the apps folder. From time to time there is a sync conflict which needs to be resolved (Syncthing adds some extra files with the suffix .sync-conflict-NNN.
When it comes to Android, I had no problem running Syncthing, it was not significially draining my battery compared to other apps.

You can pause Syncthing through the web interface on Android if you need to preserve battery to the max . But need to manually enable it afterwards.