Skip to content

Agent Zero AI framework

refactor(gitignore): Improve usr directory handling to prevent nested git repositories

frdel07512b3bb873
diff --git a/.gitignore b/.gitignore
index 51d3a9268..d4a41496c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,10 +27,19 @@ logs/**
# Handle tmp and usr directory
tmp/**
!tmp/**/
+
+# hack to keep .gitkeep but ignore nested repos
+# Ignore everything under usr
usr/**
+# Ignore nested repos
+/usr/**/.git
+# Allow git to traverse directories
!usr/**/
+# Re-ignore everything again
+usr/**/*
+# But allow .gitkeep files
+!usr/**/.gitkeep
-# Handle knowledge directory
# Global rule to include .gitkeep files anywhere
!**/.gitkeep