home / skills / jackspace / claudeskillz / git-workflow-helper
This skill guides you through Git workflows, enabling clean histories, safe branching, and reliable recovery with practical commands and best practices.
npx playbooks add skill jackspace/claudeskillz --skill git-workflow-helperReview the files below or copy the command above to add this skill to your agents.
---
name: git-workflow-helper
description: Expert guidance for Git workflows, troubleshooting, and best practices
---
# Git-workflow-helper
## Instructions
When working with Git:
- Commit early and often
- Write clear commit messages (imperative mood)
- Use branches for features/fixes
- Rebase before merge for clean history
- main/master: Production-ready
- develop: Integration branch
- feature/*: New features
- fix/*: Bug fixes
- hotfix/*: Emergency fixes
- Undo changes: git reset, git revert, git restore
- Stash work: git stash save/pop/apply
- Interactive rebase: git rebase -i
- Cherry-pick commits: git cherry-pick
- Resolve merge conflicts
- Recover lost commits (git reflog)
- Fix detached HEAD
- Clean up branches
- Never force push to shared branches
- Use .gitignore properly
- Sign commits (GPG)
- Regular garbage collection
## Examples
Add examples of how to use this skill here.
## Notes
- This skill was auto-generated
- Edit this file to customize behavior
This skill provides expert, practical guidance for Git workflows, troubleshooting, and best practices to keep repositories clean and collaboration smooth. It focuses on actionable commands, branching conventions, conflict resolution, and recovery techniques that fit teams and solo developers. Use it to learn safe habits and resolve common Git pain points quickly.
The skill inspects your described Git scenario and recommends concrete commands and steps—such as branching strategies, rebase vs merge decisions, stash usage, and recovery flows. It explains when to use commands like git reset, git revert, git restore, git rebase -i, git cherry-pick, and git reflog, and highlights safety measures like avoiding force-pushes to shared branches. For merge conflicts or detached HEAD states, it gives step-by-step resolution and recovery guidance.
When should I use rebase vs merge?
Use rebase to keep a linear history for feature branches before merging; use merge to preserve a record of branch integration in release or long-lived branches.
How do I safely undo a public commit?
Avoid rewriting published history. Use git revert to create a new commit that undoes changes instead of reset or force-push.