git-workflow-skill

Manages Git commits, branches, rebases, cherry-picks, and conflict resolution safely.

1|Updated Aug 7, 2025
One-click install
npx skills add https://github.com/zzafergok/arktos --skill git-workflow-skill-zzafergok
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-workflow-skill
Source: https://github.com/zzafergok/arktos/tree/main/.agent/skills/git-workflow-skill
Command: npx skills add https://github.com/zzafergok/arktos --skill git-workflow-skill-zzafergok

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Changing Git history or repository state is risky: force-pushes, resets, and blind conflict resolutions can destroy work or disrupt collaborators. This Skill guides safe Git operations by inspecting repository state first and choosing the least disruptive command for each task. ## Core Features & Use Cases - Safe History Operations: Guides rebase, cherry-pick, revert, bisect, worktree, and reflog usage with clear rules on when each is appropriate. - Conflict Resolution: Resolves merge conflicts by understanding both sides semantically instead of blindly choosing ours or theirs, then verifies with diffs and checks. - Recovery and Protection: Locates lost commits via reflog, creates safety references before destructive actions, and never force-pushes shared branches without authorization. - Use Case: You need to move a commit from a feature branch to main, resolve a merge conflict, and recover a commit lost after a bad reset—all without touching unrelated uncommitted changes. ## Quick Start Ask the assistant to cherry-pick a specific commit onto your current branch and resolve any conflicts while preserving your uncommitted 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 safely rebase a Git branch without losing work?▼

Inspect the worktree status, current branch, and upstream before rebasing, and confirm collaboration constraints allow history rewriting. Create a safety reference first, and prefer revert or a follow-up commit when the branch is shared.

When should I use git revert instead of git reset?▼

Use git revert to undo a commit that has been shared with others, since it preserves history by adding an inverse commit. Reserve reset for local-only changes after resolving the exact target, since it can make work unreachable.

How do I recover a lost commit after a bad git reset?▼

Use git reflog to locate previously reachable local commits before assuming work is lost. The reflog records HEAD movements, so you can identify the lost commit's hash and restore it with a branch or cherry-pick.

How should I resolve Git merge conflicts correctly?▼

Understand both sides of the conflict and the intended final behavior rather than blindly choosing ours or theirs. After resolving, inspect the resulting diff and run the most relevant checks to verify correctness.

Is it safe to force-push a shared Git branch?▼

Force-pushing a shared branch is unsafe without explicit authorization and a lease-aware plan such as --force-with-lease. Rewriting public history can destroy collaborators' work, so prefer revert or follow-up commits when possible.