git-workflow

Automate Git rebases, conflict resolution, and pull request creation with gh pr.

9|10|Updated Nov 15, 2025
One-click install
npx skills add https://github.com/jkomoros/community-patterns --skill git-workflow-jkomoros
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/jkomoros/community-patterns/tree/main/.claude/skills/git-workflow
Command: npx skills add https://github.com/jkomoros/community-patterns --skill git-workflow-jkomoros

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires github-cli.

What problem does it solve?

This Skill simplifies complex Git operations and pull request workflows, ensuring your contributions are correctly formatted, rebased, and ready for upstream merging. It reduces friction and errors in collaborative development, making your contributions smoother.

Core Features & Use Cases

  • PR Preparation: Guides you through updating and rebasing your branch before creating a pull request, preventing merge conflicts and ensuring your changes are based on the latest main branch.
  • Fork vs. Direct Workflow: Provides distinct instructions for contributing from a personal fork versus working directly on the main repository, adapting to your specific setup.
  • Automated PR Creation: Generates gh pr create commands with a standardized template, saving manual effort and ensuring all necessary information is included in your pull request.
  • Use Case: When you've completed a new pattern and the user is ready to contribute it, use this skill to ensure your branch is up-to-date, rebased, and then to generate the correct gh pr create command for a smooth submission to the upstream repository.

Quick Start

I'm ready to create a pull request for my new pattern. Use the git-workflow skill to prepare my branch and generate the PR command.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
How do I prepare my branch for a pull request using Git?

Prepare your branch by fetching the latest upstream changes, rebasing your commits on top of the main branch, and resolving any merge conflicts. This ensures your pull request applies cleanly and reflects the current state of the repository, reducing review friction and merge delays.

What's the difference between contributing from a fork versus the main repository?

Fork-based workflows push to your personal remote before creating a pull request to upstream, while direct repository access pushes to the main repository directly. This Skill detects your workspace setup and generates the correct git and gh pr commands for each scenario.

How do I create a pull request using the GitHub CLI?

Use gh pr create with a standardized template containing your branch changes, title, and description. This Skill generates the complete command with proper formatting, ensuring all required information is included for smooth upstream submission.

How do I resolve merge conflicts during a rebase?

Resolve merge conflicts by editing conflicted files, staging resolved changes, and continuing the rebase with git rebase --continue. This Skill guides you through each step and verifies your branch is clean before proceeding to pull request creation.

When should I use git push --force-with-lease instead of a regular push?

Use --force-with-lease after rebasing to safely overwrite your branch history without accidentally deleting teammates' commits. This Skill applies it automatically when rebasing, protecting collaborative branches while allowing your rebased commits to be pushed.

Can I use this workflow if I'm contributing to a repository I don't own?

Yes. This Skill supports fork-based contributions by detecting whether your workspace is a fork and routing commands to your personal remote before pulling upstream. It adapts instructions and PR creation to your specific access level and repository structure.