Obsidian Sync Exclude single file

Use case or problem

Now Obsidian Sync can only exclude whole folder. But sometimes, I only need to exclude several files, and these files cannot be moved to an ‘excluded’ folder. So it would be nice to have an option to exclude individual file, just like .gitignore.

15 Likes

Yes, I also have this need. Among the synchronization schemes I have used at present, the official synchronization is undoubtedly the best in speed and stability; However, in selective synchronization, there is no way to exclude a file, only the entire folder. This function can be implemented on both resiliosync and synching (they both have a. Ignore file to exclude files and folders that do not need to be synchronized). I want to exclude a file because I need different settings when using it on different devices. I want to exclude the configuration file (data. JSON) of individual plug-ins, otherwise my Vault will look strange. For example, when I work on a 4K resolution PC, my layout is just right; When switching to 1080p notebook, the display effect is really messy; At this time, I need to exclude the configuration file of workspace and set it separately to make the notebook display normally.

Yes, it would be nice to be able to exclude arbitrary files. I’m pretty sure you guys are probably sick of hearing this.

Also, it would be nice to have some visual indication that a file or a folder is not synced, so it is only local and safe to delete. I believe the current workflow is sync, exclude, and delete, which is not the most intuitive thing.

In the specific case of .gitignore, it won’t be synced anyway because Sync ignores hidden files (except of course .obsidian).

A visual indicator for non-synced files would be an excellent feature request!

2 Likes

I would also really appreciate some way to have more fine-grained control over exclusions.

The ideal (IMO) would be to support something like .gitignore, perhaps with an obsidian-specific filename like .obsidianignore or .syncignore.

For an example use-case:

I have a folder, lets say its called Ephemeral and I want the folder itself to be synced, as well as the Ephemeral/Ephemeral.md note (the folder note) but everything else in the folder to be skipped. This way I could provide some description/explanation of the folder’s no-sync/no-backup configuration that is still synced to all devices, as well as the folder itself.

This is trivial to achieve with .gitignore or .kopiaignore:

Ephemeral/*
!Ephemeral/
!Ephemeral/Ephemeral.md

Supporting the gitignore syntax would be a fantastic way to expand the rather limited folder-based exclusion to have more fine-grained control.

How is this not already a thing? I feel like ignoring some files and folders (that last part works i guess) is one of the base requirements for any kind of syncing service. I can’t stress enough how important it is for me to be able to ignore some files in all folders, just depending on their name. For example it messes with a lot of stuff if untitled files get synced, so I would just ignore Untitled.md and won’t have problems like templater triggering on multiple devices, where the only “solution” is to temporarily disable the sync plugin and pray you were fast enough, so it doesn’t sync. I also believe that untitled files should just be excluded from sync (or at least with a toggle) since if they have no title, why should they exist, other than to be updated to have a title? they are clearly not ready to be synced right?

I love obsidian, but this is honestly such a big missing part of Obsidian Sync, it makes me reconsider if it is worth the money