Git Workflow Skill

Standardizes git commit conventions, recovery patterns, and safe branching operations.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/fabioc-aloha/AlexAgent --skill git-workflow-skill-fabioc-aloha
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: Git Workflow Skill
Source: https://github.com/fabioc-aloha/AlexAgent/tree/main/plugin/skills/git-workflow
Command: npx skills add https://github.com/fabioc-aloha/AlexAgent --skill git-workflow-skill-fabioc-aloha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers often lose work to risky git operations, write inconsistent commit messages, or get stuck in merge conflicts and broken states. This Skill provides consistent git practices, recovery commands, and safe operation checklists so mistakes are reversible and history stays clean. ## Core Features & Use Cases - Commit Message Convention: Enforces a structured type(scope): description format with types like feat, fix, refactor, docs, chore, test, and style. - Recovery Patterns: Provides ready-to-use commands for undoing commits, restoring files or folders, hard resets to known-good states, and finding last good commits. - Branching, Conflicts & Worktrees: Covers branching strategy, rebase-based conflict resolution, stashing, and git worktree usage for VS Code background agent isolation. - Use Case: Before a risky refactor, create a checkpoint commit and tag; if the refactor fails, reset hard to the tagged safe point and restore only the files you need. ## Quick Start Ask the agent to load the git-workflow skill and help you undo the last commit while keeping your changes.

Frequently Asked Questions about Git Workflow Skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I undo the last git commit but keep my changes?▼

Use git reset --soft HEAD~1 to undo the last commit while keeping all changes staged in your working directory. This lets you amend the commit message or restructure the changes before committing again.

How to write a good git commit message convention?▼

Use the format type(scope): brief description, where type is one of feat, fix, refactor, docs, chore, test, or style. Add bullet-point details in the body, and avoid vague messages like "fix stuff" or "update".

How do I recover a deleted file or folder in git?▼

Restore a single file with git checkout HEAD -- path/to/file, or an entire folder with git checkout HEAD -- .github/. To find the last good state first, review recent history with git log --oneline -20.

What should I do before risky git operations?▼

Always commit everything first with git add -A and a checkpoint message, then optionally tag it as a safe point with a timestamp. This guarantees you can hard reset back to a known good state if anything goes wrong.

How do git worktrees work with VS Code background agents?▼

VS Code background agents use git worktree to isolate changes in separate working directories. The git.worktreeIncludeFiles setting copies gitignored files like .env into agent worktrees, and agents auto-commit at the end of each turn.

When should I avoid git push --force?▼

Never force-push on shared branches, since it rewrites history that teammates depend on and can destroy their work. Reserve force pushes for your own feature branches, and prefer pull --rebase to resolve divergence safely.