← ClaudeAtlas

git-workflowlisted

Apply consistent git practices for branch hygiene, safe commits, and recovery from common mishaps (lost commits, bad merges, accidental pushes). Use when authoring or reviewing a git workflow, recovering broken local state, or sequencing a commit/push that needs explicit user approval before destructive steps.
fabioc-aloha/Alex_ACT_Edition · ★ 0 · AI & Automation · score 73
Install: claude install-skill fabioc-aloha/Alex_ACT_Edition
# Git Workflow Skill > Consistent git practices, recovery patterns, and safe operations. ## ⚠️ Staleness Warning Git core is stable, but GitHub features (Actions, CLI, Copilot integration) evolve. **Refresh triggers:** - GitHub CLI major updates - GitHub Actions runner changes - New git features (e.g., `git switch`, `git restore`) - GitHub Copilot CLI integration **Last validated:** May 2026 (Git 2.45+, GitHub CLI 2.x) **Check current state:** [Git Release Notes](https://git-scm.com/docs/git/RelNotes), [GitHub CLI](https://cli.github.com/) --- ## Decision Table | Scenario | Command | Notes | |----------|---------|-------| | Undo last commit, keep changes | `git reset --soft HEAD~1` | Safe, preserves work | | Restore single file | `git checkout HEAD -- path/to/file` | Discards file changes | | Restore entire folder | `git checkout HEAD -- .github/` | Discards folder changes | | Before risky operation | `git add -A; git commit -m "checkpoint"` | Always checkpoint first | | Discard all uncommitted | `git reset --hard HEAD` | Destructive, no recovery | | Reset to remote state | `git reset --hard origin/main` | Destructive, syncs to remote | | Save work temporarily | `git stash` → `git stash pop` | For quick context switch | | Isolated experimental work | `git worktree add ../feature branch` | Agent-friendly isolation | --- ## Commit Message Convention ```text type(scope): brief description - Detail 1 - Detail 2 ``` **Types**: `feat`, `fix`, `refactor`, `docs`, `cho