diff --git a/example.gitignore b/example.gitignore
index c292c2e..413784e 100644
--- a/example.gitignore
+++ b/example.gitignore
@@ -15,8 +15,10 @@
 vendor
 
 # Ignore configuration files that may contain sensitive information.
-sites/*/settings*.php
-sites/*/services*.yml
+sites/*/*settings*.php
+!sites/*/default.settings.php
+sites/**/*services*.yml
+!sites/*/default.services.yml
 
 # Ignore paths that contain user-generated content.
 sites/*/files
@@ -29,7 +31,10 @@ sites/simpletest
 # or delete the previous settings and uncomment the following ones, instead.
 
 # Ignore configuration files that may contain sensitive information.
-# */settings*.php
+# */*settings*.php
+# !*/default.settings.php
+# !sites/*/services.yml
+# !*/default.services.yml
 
 # Ignore paths that contain user-generated content.
 # */files
