From: Pasukhin Dmitry Date: Sat, 1 Nov 2025 19:52:20 +0000 (+0000) Subject: Configuration, gitignore - Ignore all at root except explicit allowlist (#787) X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=fe2f7bc983f0382e2da3700670492044804d2465;p=occt.git Configuration, gitignore - Ignore all at root except explicit allowlist (#787) Add single-level rules to ignore everything at the repository root while whitelisting essential config files and directories. Explicitly allow selected data subdirectories and top-level src modules, and preserve deeper-level ignore rules. --- diff --git a/.gitignore b/.gitignore index f995bd0ba6..e255c8c4f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,52 @@ +# ============================================================================ +# SINGLE-LEVEL RESTRICTIONS: Only accept what's already tracked in git +# (These rules apply only at the specified level, deeper levels follow rules below) +# ============================================================================ + +# Root level: Ignore everything except tracked items +/* +!/.clang-format +!/.git-blame-ignore-revs +!/.gitattributes +!/.gitignore +!/.tgitconfig +!/CMakeLists.txt +!/LICENSE_LGPL_21.txt +!/OCCT_LGPL_EXCEPTION.txt +!/README.md +!/adm/ +!/cmake/ +!/data/ +!/dox/ +!/samples/ +!/src/ +!/tests/ +!/tools/ +!/.github/ + +# data/ level: Ignore everything except tracked subdirectories +/data/* +!/data/iges/ +!/data/images/ +!/data/occ/ +!/data/step/ +!/data/stl/ +!/data/vrml/ + +# src/ level: Ignore everything except tracked items +/src/* +!/src/MODULES.cmake +!/src/ApplicationFramework/ +!/src/DataExchange/ +!/src/Draw/ +!/src/FoundationClasses/ +!/src/ModelingAlgorithms/ +!/src/ModelingData/ +!/src/Visualization/ + +# ============================================================================ +# DEEPER LEVEL RULES (applied recursively within allowed directories above) +# ============================================================================ # standard directories for derived files in CASROOT /.adm