using-git
Git command conventions. Use when running any git commands to avoid blocking on interactive pager.
When & Why to Use This Skill
This Claude skill optimizes Git command execution for automated and non-interactive environments by enforcing the use of the `--no-pager` flag. It prevents terminal sessions from hanging on interactive pagers during operations like 'git log', 'git diff', and 'git show', ensuring seamless data retrieval for AI agents and automation scripts.
Use Cases
- Automated Repository Analysis: Fetching commit histories and logs without manual intervention or terminal blocking.
- AI-Driven Code Reviews: Enabling AI agents to retrieve and analyze code differences (diffs) in a single, continuous output stream.
- CI/CD Pipeline Scripting: Executing Git commands within automated workflows where interactive prompts would cause the process to stall.
- Headless Environment Operations: Running version control commands in environments without a TTY or user input capability.
| name | using-git |
|---|---|
| description | Git command conventions. Use when running any git commands to avoid blocking on interactive pager. |
Git Commands
Always use --no-pager BEFORE the git command to avoid blocking on interactive pager:
git --no-pager log -10
git --no-pager diff
git --no-pager show
The --no-pager flag must come before the subcommand (log, diff, show, etc.), not after.