CharlesChiuGit / Logseq-Git-Sync-101

This repo aims to help Logseq users to sync their data with Git and GitHub.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fatal: cannot lock ref 'HEAD'

szjani opened this issue · comments

I get this weird message on Windows if and only if I modified the graph on my iPhone. Although this message box appears, everything looks fine, the modifications are visible. Still, very annoying. If I manually run fetch or pull from Git bash, there is no such issue.
image

r u kept both windows logseq and ios logseq opened at the same time while modifying one of those?

No, they are not opened at the same time. There is no conflict.

Sorry, this is beyond my pay grade. I'm not 100% sure how built-in git in logseq works.
Personally I never ran into this after I use this plugin with manually git pull/push via it.
Maybe consider give it a try?

I've setup Logseq on a Linux device and have the same issue. The ~/.gitconfig contains only the name and email address, nothing else.

So did u try the git plugin instead of built-in auto-commit?

No, not yet. I'm going to check that, but honestly I would not like to commit manually. And I think the issue happens during pull, in the pre-commit hook.

ys, I do know it's related to pull. Will be greatly appreciated if u have a better idea about pre-commit! PR is always welcomed.

Could not find any meaningful thing. I cannot even find Google hits that anyone is doing git pull in pre-commit hook. It is strange that it is only a problem for me and I can reproduce it both on Windows 11 and on Ubuntu.

Anyway, I've installed the git plugin, it works as expected. I'm sure it will happen that I cannot find something on my phone because I forgot to commit/push on desktop. :(

Sorry, this is the best solution I can provide so far. PR is always welcomed.
Or maybe u can try the official logseq sync, which is pretty solid in my limited experience.
Close this issue for now, feel free to reopen it in the future.