github-sync-pr-flow

Guides Git branch syncing, committing, pushing, and pull request creation for GitHub repositories.

5.3k|976|Updated Aug 25, 2025
One-click install
npx skills add https://github.com/Devin-AXIS/iPolloWork --skill github-sync-pr-flow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-sync-pr-flow
Source: https://github.com/Devin-AXIS/iPolloWork/tree/main/.codex/skills/github-sync-pr-flow
Command: npx skills add https://github.com/Devin-AXIS/iPolloWork --skill github-sync-pr-flow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Coordinating local changes with a remote main branch is error-prone: developers risk losing uncommitted work, creating merge conflicts, pushing to the wrong branch, or opening malformed PRs. This Skill provides a guarded, step-by-step Git workflow that preserves local edits, syncs personal branches with origin/main, and produces clean English commits and PRs.

Core Features & Use Cases

  • Safe Pull/Sync Workflow: Stashes dirty local edits, fetches and merges origin/main into the current personal branch, then re-applies stashed work with conflict detection and reporting.
  • Commit and Push Guardrails: Runs preflight checks on branch state, stages only intended files, validates with git diff --check, and pushes to the current personal remote branch with English commit messages.
  • PR Creation and Merge Flow: Opens pull requests from the personal branch to main via GitHub CLI or API, checks CI and review status before merging, and never pushes directly to main.
  • Use Case: A developer says "sync my branch with main and open a PR"—the Skill stashes local work, merges origin/main, restores the stash, reports any conflicts, commits and pushes, then opens a PR with an English title and body.

Quick Start

Ask the assistant to sync my current branch with main and open a pull request for my local changes.

Frequently Asked Questions about github-sync-pr-flow

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

FAQPage Schema
How do I sync my local branch with remote main without losing changes?

Stash uncommitted work with git stash push -u, fetch origin, merge origin/main into your current branch, then run git stash pop to restore your edits. If conflicts occur during merge or stash pop, stop and review the conflicting files before resolving.

How do I create a pull request from my branch to main on GitHub?

First push your committed changes to your personal remote branch, then open a PR using the GitHub CLI or API with main as the base branch. Write the PR title and body in English describing what changed, why, validation performed, and known risks.

What should I do when git merge produces conflicts?

Stop immediately and report each conflict file with its module, the remote/main side changes, and your local side changes. Decide whether to keep remote, keep local, or combine changes before editing conflict hunks, and never resolve silently.

Can I push commits directly to the main branch?

No, direct pushes to main are not allowed in this workflow. All changes must go through a pull request from your personal branch, which is merged on GitHub only after CI checks pass and review approval is granted.

Why should I avoid git pull when syncing with main?

Plain git pull hides whether incoming changes came from main, the branch upstream, or both. Using git fetch followed by an explicit git merge origin/main makes the sync source clear and gives you control over conflict handling.