obsidian-git
obsidian-git copied to clipboard
[Feature]: Add {{author}} to the commit template
Description
Obsidian-git facilitates collaboration on a single Obsidian vault by allowing users to synchronize their vault to a remote Git repository. However, in the current implementation, one cannot specify the author in the automatic backup/commit messages. This feature becomes crucial in collaborative environments where multiple users contribute to the same Obsidian vault.
Proposed Enhancement
Introduce a new variable, {{author}}, to Obsidian-git commit messages template.
Use Case
In scenarios where multiple users are collaborating on a shared Obsidian vault, the ability to attribute changes to specific authors enhances transparency and accountability.
Additional Context
Obsidian-git already supports the use of {{hostname}} in commit messages for situations where a single user manages notes across different devices. Extending this support to include {{author}} would provide a comprehensive solution for both single-user and collaborative environments.
Example
| Commit message on auto backup/commit |
|---|
| vault backup: {{date}} - {{author} |
vault backup: 2024-02-16 - dhmmasson
What's the benefit of showing the author name in the commit message if the commit already contains the author, which is shown in git log or GitHub commit history as well?
Thank your for your response.
The benefit is to see it in the history view in obsidian :
.
I think I went from the idea of the {{date}} that is also in the commit. That Backup is the backup of the modification by X at T. it was simple and customizable.
But you are right that it could be directly displayed in the history view from the commit info instead of embedded in the message, that would probably imply having a set of options similar to the line-authoring. Allowing to customize
- Author name display (none, initials, fullname...)
- Author name position (before|after)
- Authoring date display
Would you be interested in a PR to support that feature ?
I've added the feature now myself, but thanks for offering to contribute. There are now two new options in the settings.
Thank you for adding that feature! It would have been a pleasure to contribute directly as I really appreciate your plugin. I'll gladly contribute to other issues if you are interested.
Best,