|
1 | | -# Obsidian Github Sync |
| 1 | +# Obsidian GitHub Sync |
2 | 2 |
|
3 | | -Plugin to sync a Github repository with an Obsidian vault. |
| 3 | +Plugin to sync a GitHub repository with an Obsidian vault. |
4 | 4 |
|
5 | | -# TODO |
| 5 | +> [!CAUTION] |
| 6 | +> This is still in beta. |
| 7 | +
|
| 8 | +## Features |
| 9 | + |
| 10 | +These are the main features of the plugin: |
| 11 | + |
| 12 | +- Desktop and mobile support |
| 13 | +- Doesn't require `git` |
| 14 | +- Multiple vaults sync |
| 15 | +- Partial vault sync |
| 16 | +- Partial remote repository sync |
| 17 | +- Automatic sync on fixed interval |
| 18 | +- Manual sync |
| 19 | + |
| 20 | +- Conflicts handling (TODO 🔨) |
| 21 | +- Filtering by file type (TODO 🔨) |
| 22 | + |
| 23 | +## Installation |
| 24 | + |
| 25 | +The plugin is still in beta so it's still not available in the community plugins. |
| 26 | + |
| 27 | +For the time being you can install it with BRAT. If you never used BRAT see [the official quick start guide](https://tfthacker.com/brat-quick-guide). |
| 28 | + |
| 29 | +If you already have BRAT installed click [here](obsidian://brat?plugin=https://github.com/silvanocerza/obsidian-github-sync) to install GitHub Sync. |
| 30 | + |
| 31 | +## Usage |
| 32 | + |
| 33 | +### First sync |
| 34 | + |
| 35 | +When starting the plugin for the first time a dialog will guide you through the setup process. |
| 36 | + |
| 37 | +If you already have files in your vault I strongly recommend you to create a new private GitHub repository and sync with that. |
| 38 | + |
| 39 | +> [!NOTE] |
| 40 | +> Onboarding is currently not supported on mobile. |
| 41 | +
|
| 42 | +### Token |
| 43 | + |
| 44 | +A GitHub Fine-grained token is required to sync with your repository. You can create one by clicking [here](https://github.com/settings/personal-access-tokens/new). |
| 45 | +The token must have the `Contents` permission set to `Read and write` like in the screenshow below. |
| 46 | + |
| 47 | + |
| 48 | +I also suggest creating the token with access only to your sync repo. |
| 49 | + |
| 50 | +### Sync modes |
| 51 | + |
| 52 | +You can always sync manually by clicking the sync button in the side ribbon. |
| 53 | +This will always work even if sync on interval is enabled. |
| 54 | + |
| 55 | + |
| 56 | +If you don't want to see the button you can hide it, just check the plugin settings. |
| 57 | + |
| 58 | +The `Sync with GitHub` command is also available. |
| 59 | + |
| 60 | +### Partial sync |
| 61 | + |
| 62 | +Optionally you can choose to sync only a part of your vault and/or your repository. |
| 63 | +This might be useful if you keep the sources for your blog in your vault as example, though you sync with some other service. |
| 64 | + |
| 65 | +> [!WARNING] |
| 66 | +> For the time being changing the directories after onboarding is not supported. |
| 67 | +> I mean, you can do it, though I have not tested it and it's likely to break in unforeseeable ways. |
| 68 | +
|
| 69 | +### Config sync |
| 70 | + |
| 71 | +If you want to sync your vault configs with other vault you can enable that. |
| 72 | +It will sync the whole folder, that is `.obsidian` by default, including all plugins and themes. |
| 73 | + |
| 74 | +If you use another sync service it might be best to disable this option. |
| 75 | + |
| 76 | +> [!NOTE] |
| 77 | +> The `.obsidian` folder will always be in the root of your repository, even if you choose |
| 78 | +> to not sync vault configs. That happens cause the plugin needs to store some metadata to |
| 79 | +> correctly sync. |
| 80 | +
|
| 81 | +### Reset |
| 82 | + |
| 83 | +I still have to add a reset button to clean the plugin settings and metadata. |
| 84 | + |
| 85 | +For the time being you can reset the plugin by disabling it in the plugins list and deleting the `github-sync-metadata.json` |
| 86 | +file in your config directory, `.obsidian` by default. |
| 87 | + |
| 88 | +## License |
| 89 | + |
| 90 | +The project is licensed under the [AGPLv3](https://www.gnu.org/licenses/agpl-3.0.en.html) license. |
0 commit comments