push-to-pr

Push local commits to an existing PR's source branch via GitHub API.

Updated Mar 31, 2026
One-click install
npx skills add https://github.com/StarrySerendipity/N.E.K.O --skill push-to-pr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: push-to-pr
Source: https://github.com/StarrySerendipity/N.E.K.O/tree/main/.agent/skills/push-to-pr
Command: npx skills add https://github.com/StarrySerendipity/N.E.K.O --skill push-to-pr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Push commits to an existing PR's source branch without creating new branches, keeping the PR workflow clean and reviewable.

Core Features & Use Cases

  • PR head branch discovery: Find the PR head branch via GitHub API and verify maintainer_can_modify is true.
  • Remote configuration & push: Ensure the correct remote is configured and push using HEAD:<branch>.
  • Safe update scenarios: Update existing PRs, support rebase against head, and avoid creating new branches.

Quick Start

Push your local commits to PR #N by using the PR head branch and never creating new branches.

Frequently Asked Questions about push-to-pr

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

FAQPage Schema
How do I push local commits to an existing GitHub pull request without creating a new branch?

To push local commits to an existing GitHub pull request, identify the PR head branch via the GitHub API, validate maintainer_can_modify, configure the remote, and push using HEAD:<branch>.

Can I rebase local work onto a pull request head branch without branch proliferation?

Yes, you can rebase local work onto a pull request head branch without branch proliferation by discovering the head branch via the GitHub API and pushing your commits directly using HEAD:<branch>.

What does maintainer_can_modify mean when updating an open pull request?

The maintainer_can_modify flag is a GitHub API setting that must be validated as true to ensure maintainers can modify the pull request, allowing you to safely push commits to the PR head branch.

How to configure the correct git remote to push to a pull request source branch?

To configure the correct git remote to push to a pull request source branch, fetch the PR head branch via the GitHub API and update your local remote to push using the HEAD:<branch> syntax.

Why does pushing to a pull request create a new branch instead of updating the existing one?

Pushing to a pull request creates a new branch when the remote is not configured correctly, so you must identify the PR head branch via the GitHub API and push using HEAD:<branch> to avoid branch proliferation.

What's the best way to sync local commits to an open pull request without branch proliferation?

The best way to sync local commits to an open pull request without branch proliferation is to identify the PR head branch via the GitHub API and apply HEAD:<branch> to push your local work.