diff --git a/.gitignore b/.gitignore
index f989dee3bcb0..aecf971d30aa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,5 @@
 __pycache__/
-build/
+*build*/
 patches/
 *.patch
 *.pyc
