- Edit the line noted to point to your logging script
- Save this file as post-commit inside the git directory's
.git/hooks
directory - Make sure to
chmod +x .git/hooks/post-commit
- That's it.
Now, any time you make a commit for that repo, you'll get a nicely formatted Day One log entry formatted like so:
Commit to REPO_NAME (SHA1@BRANCH)
Your commit message here
It works awesome with single line commits from the command line, and even works with github.app for crafting nicer, longer commit messages. And any markdown in your commit message will be properly formatted inside Day One as well.