From 4544cacec35e4bff370cae4c784f02ca48fbb499 Mon Sep 17 00:00:00 2001 From: Vinzent Date: Thu, 22 Feb 2024 23:57:27 +0100 Subject: [PATCH] docs: add Obsidian sync instructions and a bit macos ssh auth --- docs/Authentication.md | 4 ++++ docs/Tips-and-Tricks.md | 13 +++++++++++++ src/setting/settings.ts | 3 +++ 3 files changed, 20 insertions(+) diff --git a/docs/Authentication.md b/docs/Authentication.md index 90b4e3bf..5bfea963 100644 --- a/docs/Authentication.md +++ b/docs/Authentication.md @@ -61,6 +61,10 @@ git config --global credential.helper osxkeychain You have to do one authentication action (clone/pull/push) after setting the helper in the terminal. After that you should be able to clone/pull/push in Obsidian without any issues. +## SSH + +GitHub provides a great documentation on how to [generate a new SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=mac#generating-a-new-ssh-key) and then on how to [add the SSH key to your ssh-agent](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent?platform=mac#adding-your-ssh-key-to-the-ssh-agent). + # Windows ## HTTPS diff --git a/docs/Tips-and-Tricks.md b/docs/Tips-and-Tricks.md index bbfed130..2917e9fe 100644 --- a/docs/Tips-and-Tricks.md +++ b/docs/Tips-and-Tricks.md @@ -22,3 +22,16 @@ There's also the `Edit .gitignore` command that will open the file in a modal. .trash/ .DS_Store ``` + + +## Usage with Obsidian Sync + +A common use case for using git and Obsidian Sync is to use Sync to actually sync between all your devices and git as a form of backup and version history. + +### Use Git plugin only on one device + +In case you are syncing your enabled plugins and their settings, the Git plugin is enabled and running even though the `.git` directory doesn't exist or you don't want to run auto backups on that device. To fix this, you can enable the "Disable on this device" option under "Advanced" in the plugin settings. That setting is not synced to other devices. + +### Use Git plugin, but not to pull your files + +Another use case might be that you don't want to update your files on pull, because Obsidian Sync already updated your files. You can still commit/push/backup. To accomplish this use "Other sync service" as "Sync Method" under "Backup". This only updates the HEAD to the latest commit on pull, but doesn't change your files at all. diff --git a/src/setting/settings.ts b/src/setting/settings.ts index 95926224..da0c680d 100644 --- a/src/setting/settings.ts +++ b/src/setting/settings.ts @@ -722,6 +722,9 @@ export class ObsidianGitSettingsTab extends PluginSettingTab { new Setting(containerEl) .setName("Disable on this device") + .setDesc( + "Disables the plugin on this device. This setting is not synced." + ) .addToggle((toggle) => toggle .setValue(plugin.localStorage.getPluginDisabled())