Skip to content

Instantly share code, notes, and snippets.

@jult
Last active May 25, 2025 14:27
Show Gist options
  • Save jult/e2eaedad6b9e29d95977fea0ddffae7d to your computer and use it in GitHub Desktop.
Save jult/e2eaedad6b9e29d95977fea0ddffae7d to your computer and use it in GitHub Desktop.
syncthing ignore file(s) .stglobalignore and .stignore
// .stglobalignore
// Incomplete files (downloads and such)
// These prevent Syncthing from transferring data that's going to be thrown out once the download is finished etc.
*.part
*.crdownload
*.log
*.shm
// use Firefox' or Chrome's own Syncing option for this;
*.sqlite*
// Temporary/Backup Files
*~
._*
*Temporary*
*.swp
*.bak
*.tmp
*.old
// OS-generated files
desktop.ini
ehthumbs.db
Thumbs.db
.DS_Store
.Spotlight-V100
._*
.Trash*
*.wal
*S*Conflict*
*s*conflict*
*.sync
*.bts
*.!Sync
.SyncID
.SyncIgnore
.SyncArchive
*.SyncPart
*.SyncTemp
*.SyncOld
*.git
*.svn
searchIndex
asset-cache
checkouts
*CACHE*
*Cache*
*cache*
captcha_tmp
imgcache
nobackup
staging.*
templates_c
tmp_uploads
dev/
proc/
sys/
tmp/
run/
mnt/
selinux/
@jult
Copy link
Author

jult commented Jan 15, 2017

// the line below is .stignore's content, i.e. put both this and .stglobalignore in the root of your sync folder(s) (where .stfolder resides)
// main reason for include is because syncthing then syncs this file too, and updates don't ruin my careful ignore project ;-)
// see also https://forum.syncthing.net/t/useful-stignore-patterns/1175

#include .stglobalignore

@juliangaal
Copy link

where does this file have to be placed for the use with #include? Can't find anything in the 'Ignoring' docs.

@jult
Copy link
Author

jult commented Mar 18, 2022

it says exactly where IN the comment after // please read..

@juliangaal
Copy link

oh, in your comment, not gist

@martin-braun
Copy link

Missing or corrected entries:

(?d).DS_Store
.AppleDouble
.LSOverride
.DocumentRevisions-V100
.fseventsd
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
.apdisk
*.icloud
(?d)Thumbs.db
(?d)Thumbs.db:encryptable
(?d)ehthumbs.db
(?d)ehthumbs_vista.db
*.stackdump
(?i)desktop.ini
*.lnk

Sources:

To append my suggestions, please remove these entries from the original gist before appending this one to avoid duplicates:

.DS_Store
Thumbs.db
ehthumbs.db
desktop.ini

@deron-dev
Copy link

// jult (duplicates in martin-braun's post removed)

$RECYCLE.BIN
$WINDOWS.~BT
*.!Sync
*.Cache
*.SyncOld
*.SyncPart
*.SyncTemp
*.bak
*.bts
*.crdownload
*.git
*.lock
*.log
*.old
*.part
*.shm
*.sqlite*
*.svn
*.swp
*.sync
*.tmp
*.wal
*CACHE*
*S*Conflict*
*Temporary*
*cache*
*inaccessible*
*s*conflict*
*~
.#*
.*.swp
.Prullenbak
.Shared
.Spotlight-V100
.SyncArchive
.SyncID
.SyncIgnore
.Trash*
._*
.escheck.tmp
.gvfs
.local/share/trash
.svn
.sync
.thumbnails
.trash*
.~lock.
@eaDir
LOST.DIR
System*Volume*
TEMP
Temp
Trash*
a_writable
asset-cache
captcha_tmp
checkouts
data/searchIndex
dev/
files_trashbin/
forms.json
lost+found
nobackup
pagefile.sys
proc/
run/
searchIndex
selinux/
staging.*
sys/
templates_c
thumbnails
tmp/
tmp_uploads
trash
var/lib/lxcfs/
~$*

// martin-braun

(?d).DS_Store
.AppleDouble
.LSOverride
.DocumentRevisions-V100
.fseventsd
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
.AppleDB
.AppleDesktop
Network Trash Folder
.apdisk
*.icloud
(?d)Thumbs.db
(?d)Thumbs.db:encryptable
(?d)ehthumbs.db
(?d)ehthumbs_vista.db
*.stackdump
(?i)desktop.ini
*.lnk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment