Hello,
I am trying to make some automations with git hooks. I managed to change commit messages with commit-msg
hook. But unfortunately post-commit
hook is not working with Logseq commits.
If I commit with manually (like git commit --amend
for example) it works. If I trigger hook with git hook run post-commit
it works. But with Logseq auto commit post-commit
is not triggers.
Reproduce:
- Create
post-commit
script in~/.logseq/git/your_logseq_directory/.git/hooks/
directory - Make it executable (
chmod +x post-commit
) - Put different commit message in it. Like:
#!/bin/sh git commit --amend -m "This is a post-commit triggered commit!"
- Change something in your Logseq and wait to git auto commit.
- Check
git log
to see if yourpost-commit
hook is triggered and changed the commit message.