# Allowing to sync the .stignore file - any caveats?

**URL:** https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838
**Category:** Development
**Created:** [April 17, 2020, 2:30am UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838 "2020-04-17T02:30:27Z")
**Posts on this page:** 6
**Page:** 2

<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 31, 2020, 2:08pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/22 "2020-07-31T14:08:19Z")

</div>

Yes, that sounds very cool. It would definitely allow for more personalised configuration. My solution is really just a quick, brute-force workaround 😬.

---

<div class="post-metadata">

### Author: ![sadphi](https://forum.syncthing.net/user_avatar/forum.syncthing.net/sadphi/32/9300_2.png) [@sadphi](https://forum.syncthing.net/u/sadphi)
#### Post date: [August 1, 2020, 6:26pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/23 "2020-08-01T18:26:49Z")

</div>

Awesome, then we’re at least two who would use it! The question still stands if there’s a wide enough use-case for it. However, I haven’t really developed in Go, so I wouldn’t know where/how to start 😅

---

<div class="post-metadata">

### Author: ![AudriusButkevicius](https://forum.syncthing.net/user_avatar/forum.syncthing.net/audriusbutkevicius/32/277_2.png) [@AudriusButkevicius](https://forum.syncthing.net/u/AudriusButkevicius)
#### Post date: [August 1, 2020, 8:03pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/24 "2020-08-01T20:03:13Z")

</div>

You can already achieve that by using include directive.

---

<div class="post-metadata">

### Author: ![sadphi](https://forum.syncthing.net/user_avatar/forum.syncthing.net/sadphi/32/9300_2.png) [@sadphi](https://forum.syncthing.net/u/sadphi)
#### Post date: [August 2, 2020, 5:22pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/25 "2020-08-02T17:22:40Z")

</div>

That’s true, however the current implementation does not allow including a file when the folder is added to a device. Adding for example `#include .globalstignore` to the rules when initially adding a folder will just throw an error, as the file doesn’t exist locally yet, which makes sense.

However I think it would be much better if Syncthing instead would pull the file(s) specified in the include(s) (if they exist in the cluster), apply those rules, and then begin pulling all other files.

The error thrown is this one

```
2020-08-02 19:13:19 Error on folder "Test" (94clu-ucu8j): loading ignores: failed to load include file .globalstignore: open \\?\[folder path]\.globalstignore: Det går inte att hitta filen.
```

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [August 2, 2020, 5:24pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/26 "2020-08-02T17:24:51Z")

</div>

One solution could be a flag for optional includes (missing is not an error) combined with default ignore patterns (we want those anyhow).

Chicken-and-egg problem remains, but that’s the case with any synced-ignores setup…

---

<div class="post-metadata">

### Author: ![calmh](https://forum.syncthing.net/user_avatar/forum.syncthing.net/calmh/32/15311_2.png) [@calmh](https://forum.syncthing.net/u/calmh)
#### Post date: [December 1, 2020, 4:12pm UTC](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838/28 "2020-12-01T16:12:48Z")

</div>



[Previous page](https://forum.syncthing.net/t/allowing-to-sync-the-stignore-file-any-caveats/14838.md?page=1)
