Obsidian-git and .gitignore

What I’m trying to do

Not have ignored folders appear.

Things I have tried

Searched and read.

Is there a way to have .gitignore respected by Obsidian or to excliude folders?

I’m no git expert but I don’t think a .gitignore can be used to display/hide some folders within Obsidian (at least, afaik :sweat_smile: )

Obsidian, natively, doesn’t really care if your vault is a git repo or not as it has no support for it …
I mean, only git will read and use the .gitignore to do what it has to do :blush:

I think you might need to look for a community plugin providing such feature to do that…
At least, if you want to still be able to access the content of these folders from within Obsidian, when needed.

What I’m trying to do

Not have ignored folders appear.

Things I have tried

Searched and read.

Is there a way to have .gitignore respected by Obsidian or to exclude folders?

The question is about the obsidian-git plugin, and git in obsidian generally.

Obsidian setting: Files & Links > Exluded files:

You can add folders as well.

.gitignore is a file you add files and folders to exclude them from .git (e.g. many thousands of files like RAG files you don’t want to push to the remote).
The contents of this dot file has no bearing on what Obsidian does or shows.

2 Likes

Thanks. Either the excluded files option doesn’t exclude from the folder view (it sounds like it doesn’t), or I don’t understand how to configure it.

But, I found Advanced Exclude beta extension, which does. It can use .gitignore, but this is a folder that should be in git. The extension can be configured to exclude, or use an .obsidianignore file with the same syntax.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.