Home / Market / git bisect helper

git bisect helper

Guide git bisect sessions with automated test execution or manual verification to locate the commit that introduced a regression.

claude-command★ 346940 dlgithubMITInstall in CosmosUpstream Source

Documentation & Preview

--- allowed-tools: Bash(git bisect:*), Bash(git log:*), Bash(git show:*), Bash(git checkout:*), Bash(npm:*), Bash(yarn:*), Bash(pnpm:*), Read, Edit, Grep argument-hint: [good-commit] [bad-commit] | --auto [test-command] | --reset | --continue description: Use PROACTIVELY to guide automated git bisect sessions for finding regression commits with smart test execution

---

Git Bisect Helper & Automation

Automated git bisect session to find regression commits: $ARGUMENTS

Current Repository State

Task

Set up and manage an intelligent git bisect session to identify the exact commit that introduced a regression or bug.

Bisect Session Management

1. Session Initialization

2. Automatic Test Execution

3. Manual Verification Support

4. Smart Commit Analysis

Bisect Modes

Automatic Bisect (--auto [test-command])

# Automatically bisect using test command
/git-bisect-helper --auto "npm test"
/git-bisect-helper --auto "python -m pytest tests/test_regression.py"
/git-bisect-helper --auto "./scripts/check-performance.sh"

Process:

  1. Run test command at each bisect point
  2. Mark commit as good (exit code 0) or bad (non-zero)
  3. Continue until regression commit is found
  4. Provide detailed report of findings

Manual Guided Bisect

# Interactive bisect with guidance
/git-bisect-helper v1.2.0 HEAD
/git-bisect-helper abc123 def456

Process:

  1. Show current commit details and changes
  2. Provide testing suggestions
  3. Wait for user input (good/bad)
  4. Continue to next bisect point
  5. Offer insights about current commit

Continue Existing Session (--continue)

# Resume interrupted bisect session
/git-bisect-helper --continue

Process:

  1. Analyze current bisect state
  2. Show progress and remaining steps
  3. Continue with appropriate mode
  4. Provide context from previous steps

Reset Session (--reset)

# Clean up and reset bisect session
/git-bisect-helper --reset

Process:

  1. End current bisect session
  2. Return to original branch
  3. Clean up temporary files
  4. Provide session summary

Intelligent Test Execution

Test Environment Detection

Build System Integration

Test Result Interpretation

Commit Analysis Features

Change Impact Assessment

# Analyze current bisect commit
Files changed: !`git show --name-only --pretty="" HEAD`
Commit message: !`git log -1 --pretty=format:"%s"`
Author and date: !`git log -1 --pretty=format:"%an (%ar)"`

Regression Pattern Detection

Context Preservation

Advanced Bisect Strategies

Skip Strategy for Build Issues

Performance Regression Detection

Multi-criteria Bisecting

Bisect Session Reporting

Progress Tracking

Bisect Progress:
🎯 Target: Find regression in user authentication
📊 Commits remaining: ~4 (out of 127)
⏱️  Estimated time: 8 minutes
🔍 Current commit: abc123 - "refactor auth middleware"

Final Report

🎉 Regression Found!

Bad Commit: def456
Author: John Doe
Date: 2024-01-15 14:30:00
Message: "optimize database queries"

Files Changed:
- src/auth/database.js
- src/middleware/auth.js
- tests/auth.test.js

Bisect Log: 15 steps, 3 manual verifications
Total Time: 12 minutes

Recovery Commands:
git revert def456                    # Revert the problematic commit
git cherry-pick def456^..def456~1    # Cherry-pick the good parts

Integration with Development Workflow

CI/CD Integration

Team Collaboration

Debugging Enhancement

Safety and Recovery

Session Backup

Error Handling

Example Workflows

Performance Regression

# Find when tests became slower
/git-bisect-helper --auto "timeout 30s npm test"

Feature Regression

# Find when feature X broke
/git-bisect-helper --auto "./test-feature-x.sh"

Build Regression

# Find when build started failing
/git-bisect-helper --auto "npm run build"

Manual Investigation

# Interactive bisect for complex issues
/git-bisect-helper v2.1.0 HEAD

The bisect helper provides intelligent automation while maintaining full control over the debugging process, making regression hunting efficient and systematic.