Skip to content

Enhancement: Implement .gitbunignore Support to Exclude Files from AI Diff Analysis #53

@Xploit-Ghost

Description

@Xploit-Ghost

Description

Gitbun analyzes staged changes and generates context-aware Conventional Commits using local LLMs or remote APIs. However, staging large, auto-generated files (such as package-lock.json, minified assets, or compiled binaries) passes excessive and irrelevant tokens to the language model. This can significantly slow down the local Ollama generation process, consume unnecessary remote API tokens, and degrade the quality of the generated commit message.

Proposed Solution

  1. Introduce support for a .gitbunignore file at the repository root.
  2. Update the TypeScript CLI core to parse this ignore file (potentially utilizing a library like ignore).
  3. Filter the git diff output to strip out ignored files before the string is passed to the AI prompt or the fallback rule-based engine.
  4. Provide default exclusions out-of-the-box (e.g., lockfiles, build outputs) to ensure the AI only ever analyzes meaningful source code changes.

GSSoC '26 Request

Hi maintainers! 👋 I am actively participating in GirlScript Summer of Code 2026 and would love to build this filtering logic.

Could you please:

  1. Assign this issue to me.
  2. Add the gssoc26 and enhancement labels to this thread?

Thank you! I am ready with the solution and would love to contribute towards this project.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions