fix-git-issues
Scannednpx machina-cli add skill gologo13/agent-skills/fix-git-issues --openclawFiles (1)
SKILL.md
1.5 KB
Fix Git Issues
Overview
Help resolve common Git problems and conflicts with step-by-step commands and explanations for each situation.
Steps
- Merge Conflicts
- Analyze conflicting changes and their context
- Provide resolution strategies for different conflict types
- Suggest the best approach to preserve important changes
- Generate resolved code maintaining functionality
- Branch Management
- Help with branch cleanup and organization
- Suggest rebasing vs merging strategies
- Assist with cherry-picking specific commits
- Guide through complex branch operations
- Commit History
- Help with commit message improvements
- Assist with squashing and organizing commits
- Guide through interactive rebase operations
- Fix commit authorship and metadata
- Repository Issues
- Help recover from detached HEAD state
- Assist with undoing commits and changes
- Guide through stash management
- Resolve submodule and remote issues
Git Issues Checklist
- Problem identified and analyzed
- Git commands provided with explanations
- Resolution strategy validated
- Changes tested and verified
- Repository state clean and functional
Source
git clone https://github.com/gologo13/agent-skills/blob/main/skills/fix-git-issues/SKILL.mdView on GitHub Overview
Fix Git Issues helps resolve common Git problems and conflicts with step-by-step commands and explanations for each situation. It covers merge conflicts, branch management, commit history, and repository issues to keep your repo healthy.
How This Skill Works
The skill analyzes the scenario and provides structured Git commands with explanations tailored to the issue. It emphasizes preserving functionality, maintaining a clean history, and safe recovery strategies, including rebasing, merging, cherry-picking, and stash management.
When to Use It
- Resolving merge conflicts during a pull or merge
- Cleaning up branches and choosing between rebase and merge
- Squashing commits and fixing authorship or message quality
- Recovering from a detached HEAD or undoing commits
- Handling stash, submodule, or remote issues
Quick Start
- Step 1: Identify the issue type and pick the recommended strategy
- Step 2: Run the exact Git commands outlined for that scenario
- Step 3: Verify changes with tests, git log inspection, and push if appropriate
Best Practices
- Identify the problem context before acting
- Run Git commands with explanations to understand impact
- Validate the resolution strategy before applying changes
- Test the repository state after changes
- Maintain a clean history with proper commits and authorship
Example Use Cases
- Resolving a merge conflict during feature branch integration
- Rebasing a feature branch onto latest main to avoid conflicts
- Squashing commits and fixing authorship via interactive rebase
- Recovering from a detached HEAD by checking out a branch safely
- Undoing unintended changes using stash and reset
Frequently Asked Questions
Add this skill to your agents