# .stignore: optional include

**URL:** https://forum.syncthing.net/t/stignore-optional-include/26895
**Category:** Feature
**Created:** [July 5, 2026, 2:26pm UTC](https://forum.syncthing.net/t/stignore-optional-include/26895 "2026-07-05T14:26:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![proitheus](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/p/e99b99/32.png) [@proitheus](https://forum.syncthing.net/u/proitheus)
#### Post date: [July 5, 2026, 2:26pm UTC](https://forum.syncthing.net/t/stignore-optional-include/26895/1 "2026-07-05T14:26:37Z")

</div>

I use .stignore.sync and various .stignore files in subfolders to sync ignore settings across device, and #include them in .stignore. the .stignore.sync file is like this:

```plaintext
#include myrepo/.stignore
#include .stignore.symlinks

```

But sometimes the included files are synced later than the .stignore.sync, causing the whole folder to halt.

I think it’d be good if we have an optional include that just omit when the file not exist. e.g. `#include? file`. This way I can also set the default ignore pattern for all my folders to `#include? .stignore.sync`, sparing the chore to manually setup .stignore files.

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [July 5, 2026, 6:01pm UTC](https://forum.syncthing.net/t/stignore-optional-include/26895/2 "2026-07-05T18:01:40Z")

</div>

For now, as a workaround, what you can do is to use

```plaintext
!/myrepo/.stignore
!/.stignore.symlinks
/

```

first (i.e. ignore everything but the two `#include` files), then switch to your usual ignore patterns once the two files have been synced.

---

<div class="post-metadata">

### Author: ![acolomb](https://forum.syncthing.net/user_avatar/forum.syncthing.net/acolomb/32/11343_2.png) [@acolomb](https://forum.syncthing.net/u/acolomb)
#### Post date: [July 6, 2026, 5:19am UTC](https://forum.syncthing.net/t/stignore-optional-include/26895/3 "2026-07-06T05:19:00Z")

</div>

I don’t remember exactly what the outcome was, but there was at least a proposed PR for making sure that included ignore files are synced first. That won’t help if it exists on no other device, but it would allow parsing the full ignore patterns instead of halting in error state. Sorry I can’t look for the code / PR right now.

---

<div class="post-metadata">

### Author: ![rasa](https://forum.syncthing.net/user_avatar/forum.syncthing.net/rasa/32/10531_2.png) [@rasa](https://forum.syncthing.net/u/rasa)
#### Post date: [July 14, 2026, 12:14pm UTC](https://forum.syncthing.net/t/stignore-optional-include/26895/4 "2026-07-14T12:14:44Z")

</div>

It’s [feat: load remote ignore patterns (fixes #9352) by calmh · Pull Request #10669 · syncthing/syncthing · GitHub](https://github.com/syncthing/syncthing/pull/10669)
