denolehov / obsidian-git

Backup your Obsidian.md vault with git
MIT License
6.14k stars 250 forks source link

Feat: Local-only mode that never does any pushes, pulls, ect. #638

Closed jboxman closed 4 months ago

jboxman commented 8 months ago

I have git-annex setup to automatically sync my files between local systems whenever a commit happens. It would be great to handle commit messages and look at diffs within Obsidian, rather than using the CLI and VSCode for this, but it seems to want to run a push or a pull when I change files. (My laptop is closed, so an error is returned from git-annex via git; this is to be expected because the git-annex agent runs in the background and syncs whenever other systems are reachable.)

Thanks!

Vinzent03 commented 7 months ago

You can disable push on backup via the settings. If you can't find the necessary toggles, please share your config and I can tell you. But you should get it by reading the setting descriptions.

kg4zow commented 6 months ago

You might be able to set up a "remote" in another directory on the same machine and let it push/pull.

After this, the git push, git pull, and other such commands that it insists on doing, will be "pushing" to another directory on the local machine.

Disclaimer: this should work, but I haven't tested it. I just started using Obsidian a week ago, tried this plugin for the first time earlier today, and still don't have it working yet. It's entirely possible that the plugin assumes a need for authentication which wouldn't exist with a file:// URL (or in my case, a keybase:// URL).