git-workflow

Manage Git branches, commits, merges, and pull requests with best practices.

119|23|Updated May 4, 2015
One-click install
npx skills add https://github.com/einverne/dotfiles --skill git-workflow-einverne
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/einverne/dotfiles/tree/main/claude/skills/git-workflow
Command: npx skills add https://github.com/einverne/dotfiles --skill git-workflow-einverne

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides expert guidance on Git operations, branch strategies, commit hygiene, merge and rebase flows, and collaboration practices to keep repositories healthy and teams productive.

Core Features & Use Cases

  • Branch Management: Create, switch, and clean up branches following common workflows (Git Flow, GitHub Flow).
  • Commit Best Practices: Write clear, conventional commit messages and atomic changes.
  • Merge & Rebase: Safely merge, interactively rebase, and resolve conflicts.
  • Collaboration: Pull request etiquette, reviews, and upstream syncing.

Quick Start

Create a feature branch, implement a small change, commit with a conventional message, and open a PR following best practices.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
How do I set up a Git branching workflow for my team?

Git branching workflows like Git Flow and GitHub Flow provide structured patterns for creating, managing, and merging branches. Git Flow uses feature, release, and hotfix branches; GitHub Flow keeps a single main branch with short-lived feature branches. Both enforce safety through pull request reviews before merging to production.

What's the best way to write commit messages?

Conventional commit messages follow the format type(scope): description, where type is feat, fix, docs, etc. This standard makes commit history readable, enables automated changelog generation, and clarifies what changed and why. Atomic commits—one logical change per commit—further improve clarity.

How do I resolve merge conflicts safely?

Merge conflicts occur when changes overlap across branches. Resolve them by examining both versions, choosing or combining the correct code, then staging and committing the resolution. Always test after resolving; using --dry-run flags before complex merges helps identify conflicts early.

Can I rewrite Git history without losing work?

Interactive rebase lets you reorder, squash, or edit commits before pushing. Create a backup branch first, then use git rebase -i to restructure history safely. Never rebase commits already pushed to shared branches, as it rewrites history others depend on.

What's the right way to clean up branches after merging?

Delete merged branches locally with git branch -d and remotely with git push origin --delete to keep the repository clean. Use --dry-run first to preview deletions. Regular cleanup prevents branch clutter and makes repository navigation easier for collaborators.

How do I sync my branch with upstream changes?

Fetch upstream commits with git fetch, then rebase or merge them into your branch. Rebasing keeps history linear; merging preserves the full history of parallel work. Always ensure your working directory is clean before syncing to avoid conflicts.