You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you find any problem please open an issue with as many details as possible.
36
+
37
+
Please also provide logs if possible, you can find the `github-sync.log` file in your config directory. Remember to enable logging first.
38
+
39
+

40
+
43
41
## Usage
44
42
45
43
### First sync
46
44
47
-
When starting the plugin for the first time a dialog will guide you through the setup process.
45
+
> [!IMPORTANT]
46
+
> The first sync will only work if either the remote repository or the local vault are completely **EMPTY**. If both contain files the first sync will fail.
47
+
48
+
You must also configure the plugin settings before syncing.
48
49
49
-
If you already have files in your vault I strongly recommend you to create a new private GitHub repository and sync with that.
50
+
These settings are mandatory:
50
51
51
-
> [!NOTE]
52
-
> Onboarding is currently not supported on mobile.
52
+
- Your GitHub Token (see below)
53
+
- Repository owner
54
+
- Repository name
55
+
- Repository branch
56
+
57
+
If any of this is not set sync won't start.
53
58
54
59
### Token
55
60
56
61
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).
57
-
The token must have the `Contents` permission set to `Read and write` like in the screenshow below.
62
+
The token must have the `Contents` permission set to `Read and write` like in the screenshot below.
If you don't want to resolve them you can change the settings to always prefer either the remote or local version in case of conflicts.
92
+
74
93
### Config sync
75
94
76
95
If you want to sync your vault configs with other vault you can enable that.
77
96
It will sync the whole folder, that is `.obsidian` by default, including all plugins and themes.
78
97
79
-
Note that the `.obsidian` folder will always be present, that happens cause the plugin
98
+
Note that the `.obsidian` folder will always be present, this happens because the plugin
80
99
needs to store some metadata to correctly sync
81
100
82
101
> [!CAUTION]
@@ -85,10 +104,23 @@ needs to store some metadata to correctly sync
85
104
86
105
### Reset
87
106
88
-
I still have to add a reset button to clean the plugin settings and metadata.
107
+
If you need to reset the plugin settings and metadata you can easily do that in the settings.
108
+
109
+
That will completely wipe all the sync metadata so you'll have to repeat the first sync as if you just enabled the plugin for the first time.
110
+
111
+
## What's different from other sync plugins?
112
+
113
+
There are obviously other plugins that let you sync your vault with GitHub or other git hosts, like [`obsidian-git`](https://github.com/Vinzent03/obsidian-git) and [`Obsidian-GitHub-Sync`](https://github.com/kevinmkchin/Obsidian-GitHub-Sync) just to name a couple.
114
+
115
+
Most of those plugins though require the `git` executable to be present in your system, they might rely on Bash scripts too. This makes them much less portable, it's harder to use on Windows, and mobile is really unstable because most of the times they rely on [`isomorphic-git`](https://isomorphic-git.org/).
116
+
117
+
This annoyed me because I wanted to have the same experience on every platform, and I wanted especially to support mobile.
118
+
119
+
So I went a different way and chose to sync **only** with GitHub using their REST APIs, this means I don't rely in anyway on `git` being present in your system. This way I can easily support desktop and mobile with the same identical logic, and some small necessary differences in the UI for a better user experience.
120
+
121
+
This obviously comes with some limitations. Since `git` is not used you can't interact with your repository locally in any way, and any `git` feature like branching, merging, or rebasing, are not available at all.
89
122
90
-
For the time being you can reset the plugin by disabling it in the plugins list and deleting the `github-sync-metadata.json`
91
-
and `github-sync.log` files in your config directory, `.obsidian` by default.
123
+
Also since this relies only on the GitHub APIs you can only sync with GitHub and no other host.
0 commit comments