git-push-remote

Push the current branch to a remote repository with upstream tracking.

5|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/f4irline/bbqparty-ai --skill git-push-remote
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-push-remote
Source: https://github.com/f4irline/bbqparty-ai/tree/main/packages/opencode/.opencode/skills/git-push-remote
Command: npx skills add https://github.com/f4irline/bbqparty-ai --skill git-push-remote

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures that a local ticket branch is reliably published to the remote repository and configured with an upstream so collaborators and CI can see and build the work, avoiding accidental detached pushes in multi-worktree setups.

Core Features & Use Cases

  • Resolve branch identity from a provided worktree path or explicit branch name and detect detached HEAD states.
  • Check whether an upstream exists and perform a conditional push that sets upstream for new branches or pushes to the existing upstream.
  • Handle common push failures by attempting a rebase and re-push, report conflicts and authentication issues, and verify the pushed commit on origin.
  • Use Case: From a ticket worktree, push the current branch to origin with upstream tracking so the PR and CI appear automatically.

Quick Start

Use the git-push-remote skill to push the ticket worktree branch to origin and set upstream tracking if it is missing.

Frequently Asked Questions about git-push-remote

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 repository and set upstream tracking?

To push a local git branch and set upstream tracking, the skill resolves the branch from a worktree path or name, checks for an existing upstream, and executes a conditional push with -u to ensure origin tracks the branch. It then verifies the pushed commit on the remote.

What happens if my git push to origin is rejected due to remote changes?

If a git push to origin is rejected, the skill handles the failure by attempting an automatic rebase and re-push. It identifies conflicts and authentication issues during this process, reporting them so you can resolve the rebase before pushing the branch again.

Can I use this skill to push branches from a git multi-worktree setup?

Yes, you can use this skill in a git multi-worktree setup. It resolves the branch identity directly from the provided worktree path, detects detached HEAD states, and pushes the current branch to origin, avoiding accidental detached pushes across worktrees.

When do I need to set upstream tracking on a git branch?

You need to set upstream tracking on a git branch when preparing a new ticket branch for remote sharing and CI. Setting the upstream links your local branch to origin, allowing collaborators and CI systems to automatically see and build the published work.

Why does my new git branch lack an upstream connection in a multi-worktree environment?

A new git branch lacks an upstream connection in a multi-worktree environment because it was created locally without a remote tracking target. The skill detects this missing upstream and applies a conditional push with the -u flag to establish the tracking relationship.