diff --git a/.gitignore b/.gitignore
index 8e19cf3531d65877113db5c0384a7c3585e8ccc4..ba2c1f5f35b65bd6f247b5853226cb4c4369664a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,10 @@
 # SPDX-FileCopyrightText: 2021 Minyong Li <ml10g20@soton.ac.uk>
 # SPDX-License-Identifier: CC0-1.0
 
+*
+!*.*
+!*/
+
 .bsp/
 .idea/
 db/