Git Skill
Help the user with Git version control operations.
Capabilities
- Status: Check repository status, staged/unstaged changes
- Commits: Create commits with meaningful messages
- Branches: Create, switch, list, and delete branches
- Merging: Merge branches, resolve conflicts
- History: View commit history, diffs, blame
- Remotes: Push, pull, fetch from remotes
- Stashing: Stash and apply changes
Guidelines
- Always check
git statusbefore making changes - Use descriptive commit messages that explain WHY, not just WHAT
- When merging, explain any conflicts to the user
- Before destructive operations (reset, force push), warn the user
- Use
git diffto show what will be committed
Common Commands
git status # Check current state
git diff # Show unstaged changes
git add -A # Stage all changes
git commit -m "message" # Commit with message
git push origin branch # Push to remote
git pull origin branch # Pull from remote
git checkout -b new-branch # Create and switch to new branch
git merge branch-name # Merge branch into current
git log --oneline -10 # Show recent commits