Skip to content

Instantly share code, notes, and snippets.

@jult
Last active March 5, 2024 07:19
Show Gist options
  • Star 24 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • 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
// These prevent SyncThing from trying to sync data that's locked, constantly changing, going to be thrown out, unimportant, etc.
// Lots of conflicts/issues disappeared using these ignores, but do check to prevent major disappointment!
// *.log and *cache* are in there, just so you know.. but firefox' startupCache and offlineCache will be synced.
// Ignores are case sensitive.
// Put both .stignore and this .stglobalignore in the root of your sync folder(s) (where .stfolder resides)
$RECYCLE.BIN
$WINDOWS.~BT
(?d).DS_Store
(?d)ehthumbs.db
(?d)ehthumbs_vista.db
(?d)Thumbs.db
(?d)Thumbs.db:encryptable
(?i)desktop.ini
*.!Sync
*.bak
*.bts
*.Cache
*.crdownload
*.git
*.icloud
*.lnk
*.lock
*.log
*.old
*.part
*.shm
*.sqlite*
*.stackdump
*.svn
*.swp
*.sync
*.SyncOld
*.SyncPart
*.SyncTemp
*.tmp
*.wal
*CACHE*
*cache*
*inaccessible*
*S*Conflict*
*s*conflict*
*Temporary*
*~
.#*
.*.swp
.apdisk
.AppleDB
.AppleDesktop
.AppleDouble
.com.apple.timemachine.donotpresent
.DocumentRevisions-V100
.escheck.tmp
.fseventsd
.gvfs
.local/share/trash
.LSOverride
.Prullenbak
.Shared
.Spotlight-V100
.svn
.sync
.SyncArchive
.SyncID
.SyncIgnore
.TemporaryItems
.thumbnails
.Trash*
.trash*
.Trashes
.VolumeIcon.icns
._*
.~lock.
@eaDir
asset-cache
a_writable
captcha_tmp
checkouts
data/searchIndex
dev/
files_trashbin/
forms.json
lost+found
LOST.DIR
Network Trash Folder
nobackup
pagefile.sys
proc/
run/
searchIndex
selinux/
staging.*
sys/
System*Volume*
TEMP
Temp
templates_c
thumbnails
tmp/
tmp_uploads
trash
Trash*
var/lib/lxcfs/
~$*
@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

@terminal-root
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