Skip to content

Commit

Permalink
docs: add Obsidian sync instructions and a bit macos ssh auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Feb 22, 2024
1 parent 2f95fd7 commit 4544cac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions docs/Tips-and-Tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 3 additions & 0 deletions src/setting/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 4544cac

Please sign in to comment.