I want to ignore
/foo but not
/foo/bar but it just ignore everything in foo.
I doesn’t work for me. I think this kinds of overwriting works in
gitignore. Am I doing something wrong or the syntax is different with what I have in mind. I could not find anything in documentation page. Is there a solution to have what I described?
The order matters, afaik it’s a ‘first match counts’-system (top-down). In general, includes should come before more general ignore-rules.
Yeah it works now. Didn’t expect that.
Just for reference, from the “Patterns” section of Syncthing’s Ignoring Files documentation page:
.stignore file contains a list of file or path patterns. The first pattern that matches will decide the fate of a given file.
Git’s gitignore is the reverse, with the last pattern match taking precedence.