push-branch

Push the current git branch to its remote and report the result without opening a pull request.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/JSdotNet/devbook --skill push-branch-jsdotnet
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: push-branch
Source: https://github.com/JSdotNet/devbook/tree/main/plugins/delivery/skills/push-branch
Command: npx skills add https://github.com/JSdotNet/devbook --skill push-branch-jsdotnet

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Getting local commits onto a remote often requires more ceremony than needed — this Skill pushes the current branch and stops there, without creating or updating a pull request, so work is backed up and CI can run. ## Core Features & Use Cases - Safe Push Workflow: Reviews outgoing commits and diffs before pushing, scanning for secrets, .env files, or local settings that should not leave the machine. - Upstream Handling: Pushes branches that already track a remote with git push, or publishes new branches with git push --set-upstream origin <branch>. - Rejected Push Recovery: Never force-pushes; on divergence it stops and hands off to update-pr-branch to integrate the base branch first. - Use Case: You finished a feature branch and want CI to run on the remote before opening a pull request. The Skill inspects the outgoing diff, pushes the branch, and reports the existing pull request URL and check status if one exists. ## Quick Start Push my current branch to origin and tell me which commits went out.

Frequently Asked Questions about push-branch

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

FAQPage Schema
How do I push a local git branch to a remote for the first time?▼

Push a new branch with `git push --set-upstream origin <branch>` so it tracks the remote. The Skill first compares the branch against the default branch to list the commits and files that will be published before pushing.

How to push commits without opening a pull request?▼

Run a plain `git push` on a branch that already has an upstream, which publishes commits without touching any pull request. This Skill is built for exactly that case and never creates, updates, or publishes a pull request.

What should I do when git push is rejected due to divergence?▼

Do not force-push when the remote rejects a push for divergence. Report the rejection and integrate the base branch first — this Skill hands off to `update-pr-branch` to resolve the divergence before retrying.

Does pushing a branch require the GitHub CLI?▼

No, every required step uses git alone. The `gh` CLI is optional and only used to report an existing pull request's URL and check status after the push; that step is skipped when `gh` is unavailable or unauthenticated.

Can I push directly to the main or master branch?▼

Pushing to the repository's default branch requires explicit user confirmation before proceeding. The Skill detects when the current branch is `main` or `master` and asks before pushing.

How do I avoid pushing secrets or .env files to a remote?▼

Inspect the outgoing diff with `git diff @{upstream}..HEAD --stat` before pushing and scan the file list for credentials, `.env` files, or local settings. Stop and report if anything that should stay local appears in the push.