gemini -p
to leverage Google Gemini’s large context capacity.
@
syntax to include files and directories in your Gemini prompts. The paths should be relative to WHERE you run the gemini command:
@./
may include sensitive files like .env
, .git/
, or API keys. Consider using specific directories or exclusion patterns.
gemini -p
when:
.geminiignore
file to exclude specific patterns (similar to .gitignore
).geminiignore
file in your project root to exclude files and directories from Gemini analysis. The syntax follows .gitignore
patterns:
*.log
- Exclude all log filestemp/
- Exclude temp directory!important.log
- Include important.log even if *.log is excludedsrc/**/test.js
- Exclude test.js in any subdirectory of src/config.json
- Exclude config.json only in root directory