Skip to content

Conversation

@butschster
Copy link
Collaborator

@butschster butschster commented Mar 11, 2025

This PR introduces a Git integration feature that allows tracking and including code changes from Git commits in context files. The new functionality enables:

  • Including changes from specific commits, commit ranges, or time periods
  • Filtering diffs by file patterns, paths, and content
  • Rich preset aliases for common use cases ('last', 'today', 'last-week', etc.)
  • Support for branch comparison patterns ('main-diff', 'master-diff')
  • Visual tree representation of changed files
  • Optional inclusion of Git stats with diffs

Example usage in configuration:

{
  "type": "git_diff",
  "repository": "./",
  "description": "Recent Git Changes",
  "commit": "last-week", 
  "filePattern": "*.php",
  "notPath": ["tests", "vendor"],
  "showStats": true
}

Example document

recent-changes.md

@butschster butschster self-assigned this Mar 11, 2025
@butschster butschster merged commit 699d07a into main Mar 11, 2025
8 checks passed
@butschster butschster deleted the feature/git-history-diff branch March 11, 2025 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants