vrtmrz / obsidian-livesync

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Default ignore pattern settings for hidden files sync doesn't work

rainux opened this issue · comments

Abstract

The default settings of "Folders and files to ignore" under "Hidden files" doesn't work, the .git directory always be sync to another device, which mess things up.

The default settings for cross-platform is:
\/node_modules\/, \/\.git\/, \/obsidian-livesync\/,\/workspace$ ,\/workspace.json$,\/workspace-mobile.json$

Expected behaviour

Don't sync ignored directories.

Actually happened

.git directory got synced to another device.

Reproducing procedure

  1. Follow the steps provided in README to configure LiveSync for the first device.
  2. Create git repository for the vault on first device using either Git plugin or command line git.
  3. Follow the steps provided in README to configure LiveSync for the second device.
  4. Synchronizing has begun.
  5. After synchronizing done, the .git directory was also synced to the second device.

Other information, insights and intuition.

However, I found change the setting to the following can avoid this problem:

node_modules, [.]git, obsidian-livesync, workspace$ ,workspace.json$, workspace-mobile.json$

Thank you for opening the issue!

I guessed that you made .git directory on the top of the vault. Is this correct?
If so, we should add ^[.]git\/ instead of simply using [.]git. If only [.]git, the .github folder is also ignored.

However, this will get complicated. I am sure to misconfigure this with the current interface. I know that is a bit rude, but I am going to implement the idea of the PR which is currently in draft.

Yes, it is in the top/root of the vault.

I'm sorry, I didn't made the suggestion very accurate. I just want to let you know the default setting may mislead people, since using Git plugin as a vault backup solution should be natural, especially for programmers.

No no no, I didn't feel any rudeness here, it is a shame that I may didn't make my intention clear, and didn't noticed there is already a PR for this.

Glad to see it will be improved, I'll close this issue for the duplication. And thank you very much for the awesome livesync plugin!