git-push

A Git command that pushes local commits to a remote repository and tries to rebase local work when the remote branch has changed.

In plain words
What is it for?
Use it to publish the current branch's commits, set its upstream branch when needed, and retry after incorporating remote changes.
Why use it?
It handles the common case where someone else pushed changes first, while stopping and reporting the files when the rebase has conflicts.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sequenzia/claude-plugins/git-push
Clone the repo
git clone --depth 1 https://github.com/sequenzia/claude-plugins
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 621 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00010 $0.00621
Opus 5 $0.00005 $0.00311
Sonnet 5 $0.00002 $0.00124
Haiku 4.5 $0.00001 $0.00062

Measured yesterday against content hash c23579335226, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

git-push scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev-tools/commands/git-push.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Git Push

Push local commits to the remote repository. Automatically handles upstream conflicts by rebasing and retrying.

Workflow

Execute these steps in order.


Step 1: Check for Commits to Push

Get the current branch and check if there are commits to push:

git branch --show-current
git rev-parse HEAD
git rev-parse @{u} 2>/dev/null || echo "no-upstream"
  • If no upstream exists, continue to push (will set upstream).
  • If local HEAD equals upstream HEAD, report: "Already up to date. Nothing to push." and stop.
  • If local is ahead of upstream, continue to Step 2.

Step 2: Push to Remote

Push the current branch to origin:

git push origin <current-branch>
  • On success, continue to Step 4.
  • On failure, continue to Step 3.

Step 3: Handle Push Failure

If push fails due to upstream changes:

  1. Pull with rebase:

    git pull --rebase origin <current-branch>
    
  2. If rebase succeeds, retry push:

    git push origin <current-branch>
    
  3. If rebase has conflicts:

    • Report: "Rebase conflicts detected. Please resolve conflicts manually."
    • List the conflicting files
    • Provide instructions:
      To resolve:
      1. Fix conflicts in the listed files
      2. Run: git add <resolved-files>
      3. Run: git rebase --continue
      4. Run: git push origin <branch>
      
      To abort:
      Run: git rebase --abort
      
    • Stop workflow.

Step 4: Report Success

On successful push, report:

Pushed to origin/<branch>

Show the commits that were pushed:

git log @{u}..HEAD --oneline 2>/dev/null || git log -1 --oneline

Error Recovery

Push rejected (upstream changes):

  • The workflow automatically attempts git pull --rebase and retries once
  • If conflicts occur, resolve manually following the provided instructions

Rebase conflicts:

  • Resolve conflicts in listed files
  • git add <resolved-files> for each
  • git rebase --continue to finish
  • git push origin <branch> to push

Read the full file on GitHub · 119 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 119 lines · 10 tokens per session scan A c23579335226

Subscribe to this mod's changes

git-push is a command published in the GitHub repository sequenzia/claude-plugins (2 stars, last pushed 7mo ago), licensed MIT. It adds 10 tokens to every session and 621 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.