Closed OrdinaryYZH closed 1 year ago
Can you use terminal to git pull and git push? If you can't, that means you got something wrong with your git configs.
Also make sure your branch name is master
, the default one should be the main
.
In your {logseq graph folder}/.git/config
:
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
safecrlf = false
[remote "origin"]
url = git@github.com:{username}/{logseq repo name}.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "main"]
remote = origin
merge = refs/heads/main
Please note that in the [branch "main"]
section, there's a merge = refs/heads/main
, which is consistent with the first screenshot.
I can pull and push by git bash or other GUI, and I try to edit the post-commit, git push origin main -> git push origin master,but the same problem, did I edit wrong?
my .git/config :
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
symlinks = false
ignorecase = true
safecrlf = false
[remote "origin"]
url = xxxxxxxxxxxxx
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
and it's a private repo
So your default branch is master
, not main
right?
Maybe try to pull your github repo and re-link your logseq to that newly-pulled folder?
PLEASE backup your files before your do anything risky!! I would also recommand do a clear cache
in logseq, maybe it would help.
I assum u got things worked out, close it for now. Feel free to reopen it again.
@CharlesChiuGit i've had this issue constantly for like a year, have re-cloned multiple times and it persists.
the only way i've found to "fix" it is to not use the pre-commit, even though pull before commiting is desirable
@snorlaxjones hmmm, I can't reproduce it and it never happened to me on other git-related projects.
So if u do things from the terminal, everything will be fine?
I have done the step from this https://github.com/CharlesChiuGit/Logseq-Git-Sync-101/wiki/For-Windows-users
but I don't konw what the tips said , I search on web , but can't fix it