Body:
Problem
CodeGraph determines which files to index based on git tracked files (git ls-files). This means any directory excluded by .gitignore (or .git/info/exclude) is completely invisible to CodeGraph.
In some project setups, source code lives in gitignored directories intentionally — for example, a documentation platform that reads external system source code checked out into a gitignored system/ directory. CodeGraph cannot index these directories, making it unusable for such projects.
Proposed solution
Add a way to explicitly include paths that are gitignored. For example:
- A
.codegraphignore file with ! negation patterns that overrides .gitignore — similar to how !vendor/ already works for default-excluded directories, but extended to gitignored paths:
!/system
- Or an
include option in a config file (e.g., .codegraph/config.json):
{
"include": ["system/"]
}
Either approach would let CodeGraph index gitignored directories without changing git's tracking behavior.
Use case
A multi-project documentation generation platform that reads source code from multiple microservices checked out into a gitignored system/ directory. The source code is external data, not part of the project itself, so it shouldn't be committed — but CodeGraph should still be able to index it for code exploration and analysis.
Current workaround
None. The only options are:
Use git submodules (adds management overhead, conflicts with "always latest" workflow)
Commit the source code directly (not acceptable)
Don't use CodeGraph
Thanks for the great tool!
Body:
Problem
CodeGraph determines which files to index based on git tracked files (
git ls-files). This means any directory excluded by.gitignore(or.git/info/exclude) is completely invisible to CodeGraph.In some project setups, source code lives in gitignored directories intentionally — for example, a documentation platform that reads external system source code checked out into a gitignored
system/directory. CodeGraph cannot index these directories, making it unusable for such projects.Proposed solution
Add a way to explicitly include paths that are gitignored. For example:
.codegraphignorefile with!negation patterns that overrides.gitignore— similar to how!vendor/already works for default-excluded directories, but extended to gitignored paths:!/system
includeoption in a config file (e.g.,.codegraph/config.json):{ "include": ["system/"] } Either approach would let CodeGraph index gitignored directories without changing git's tracking behavior. Use case A multi-project documentation generation platform that reads source code from multiple microservices checked out into a gitignored system/ directory. The source code is external data, not part of the project itself, so it shouldn't be committed — but CodeGraph should still be able to index it for code exploration and analysis. Current workaround None. The only options are: Use git submodules (adds management overhead, conflicts with "always latest" workflow) Commit the source code directly (not acceptable) Don't use CodeGraph Thanks for the great tool!