Hey people! Created a plugin to automatically backup your vault into git. Git itself needs to be installed and git repository needs to be initialized in the vault directory, but in near future I plan to add an option to initialize git repo from within Obsidian UI.
Let me know what you think and any feedback is welcome!
Simple plugin that allows you to backup your Obsidian (https://obsidian.md) vault to a remote git repository (e.g. private repo on GitHub).
Synergises well with GitJournal mobile markdown note taking app.
Update: I was finally able to track down the issue, I had originally had my vault setup in OneDrive, then when I tried to connect GitJournal connected, I didn’t get the names correct. I was able to get my vault copied from OneDrive to GitHub, then deleted both the GitJournal and the GitHub Desktop apps, and re-installed using the same name for the repository in all instances.
Thanks for the insight! I’m also running in to issues on Windows (10). Plugin is installed and seems to be working, as there is a git:ready message in the bottom right of the main window. The settings won’t show however, so I will also try moving the vault out of OneDrive to a different location.
The problem was user error. I use Cmder on Windows which comes with git installed. I forgot to install regular Git on Windows. After installing Git for Windows the plugin menu shows and plugin is working as expected.
Obsidian Git menu does not show up on macOS Big Sur recently. I have had no problem until now. Suddenly, the menu option disappeared and I can’t use git backup. I tried uninstalling and reinstalling the plugin. Still can’t see the Obsidian Git option on the sidebar of settings.
Hey, I really value your work in the plugin, I would like help to fix it, but yet now I don’t have time to study how to contribute to plugin space, but I have feedback, whenever you use your touch bar for authentication, obsidian somehow doesn’t pick it up. Would be nice to configure which key ssh-agent would use for obsidian.
For people still having issues, try opening Obsidian.MD as administrator (at least once) after installing Obsidian Git. I cannot confirm this resolves the issue for everyone, but I was able to get to the plugin settings after I did this. (Also make sure Git Bash for Windows is installed)
I’m using macOS and also note that, when installing this plug-in and enabling it, the menu option doesn’t appear. My vault is stored in a Cryptomator container, and no matter what I’ve done the option doesn’t appear. However, if I open my vault in a non-encrypted container and enable the plug-in the menu option magically appears and is able to be utilised.
While not ideal, this could be a workaround for some of you while we wait for a bug fix, and I hope that this can aid in debugging.
Cheers.
EDIT: After having a bit of a fiddle with some other community plug-ins it seems this issue isn’t specific to the Git plugin. @kepano minimal theme settings also has this problem, but is resolved when not in a vault within an encrypted container. This is on macOS, not sure if it applies to other OS at this stage. Food for thought!
I’ve finally managed to solve it, at least for macOS users. It seems to have to do with the command line tool:
open terminal and update it with xcode-select --install
Anyone know where a set of log files might be to help diagnose the issue? Would gladly submit a PR to fix the problem but I’m not sure how to locate it.
Found it! Dev tools. Should have guessed. Found out this is a GPG Key Signing issue. I forgot that I do the automatic signing of commits and pushes. Now to figure out how to make it work with this plugin.
I really know nothing about code or this software, but I opened up a GitHub desktop app. It registers changes that I make in Obsidian. The problem is, I have to add a summary and press the button commit to Main. So it will not back up ever xx minutes and described in the app description. Wondering what I should do. Maybe get Keyboard Maestro to start the back up every five minutes. Not sure how to do that.
For Windows users this is how I got the settings page to come up.:
Make sure you have downloaded git for windows
Get a/sign into your github account. Create a new (private) repository.
You will see a page that tells you a number of ways to set up a git folder in your computer’s file system. Copy and paste the first one into your windows terminal. This will create a .git folder in your computer. Before that, you might want to use the command cd to change the current directory of the git folder to be the same as your vault folder but I’m not sure if that’s necessary (that’s what I did anyway). (E.g cd C:\Users\winky\Documents)
Restart obsidian
The settings for the plugin should come up.