Back to skills
SKILL.md
Error Handling
ASecuritySub-skill of sync: Error Handling.
- 17 stars
- 0 votes
- 0 copies
- 2 views
- Added September 9, 2026
Security analysis
100/100npx -y skills add vamseeachanta/workspace-hub --skill error-handling --agent claude-codeAre you the author of Error Handling?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/vamseeachanta-error-handling-1904577a)---
name: sync-error-handling
description: 'Sub-skill of sync: Error Handling.'
version: 1.0.0
category: workspace
type: reference
scripts_exempt: true
---
# Error Handling
## Error Handling
### Detached HEAD
```bash
cd "$WORKSPACE_ROOT/$repo"
git checkout main 2>/dev/null || git checkout master
git pull --rebase origin main
```
### Diverged History (force-pushed remote)
```bash
# Detect: behind > 0 AND ahead > 0
# DO NOT auto-resolve — ask user:
echo "$repo has diverged: $BEHIND behind, $AHEAD ahead"
echo "Options: merge, reset --hard origin/main, or skip"
```
### Stash Pop Conflict
```bash
# Report to user, do NOT auto-resolve
echo "Stash pop conflict in $repo — manual resolution required"
git stash list
```
### CRLF / Line Ending Issues
```bash
# Fix shell scripts to LF
git config core.autocrlf input
# Or per-file: dos2unix script.sh
```
Attribution
Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.