push

yuush10's avatarfrom yuush10

Push committed changes to remote. Use after /commit, before /pr, or when user says push.

0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026

When & Why to Use This Skill

This Claude skill automates the Git push process, enabling developers to securely synchronize local commits with remote repositories. It streamlines the transition from coding to collaboration by verifying repository status, handling upstream tracking for new branches, and enforcing safety guardrails to prevent destructive operations like force-pushing to protected branches.

Use Cases

  • Automating the synchronization of local feature branches to remote repositories immediately after a code commit.
  • Streamlining the developer workflow by bridging the gap between local development and the initiation of Pull Requests (PRs).
  • Ensuring safe and consistent code delivery by verifying working tree cleanliness before triggering CI/CD pipelines via remote push.
  • Handling the initial upstream setup for newly created local branches to simplify remote collaboration.
namepush
descriptionPush committed changes to remote. Use after /commit, before /pr, or when user says push.
allowed-toolsBash, Read

Git Push

Pushes committed changes to the remote repository.

Pre-Push Requirements

  • All changes committed
  • Working tree clean

Workflow

Step 1: Verify Status

git status

Confirm:

  • No uncommitted changes
  • Working tree is clean

Step 2: Push to Remote

For existing branches:

git push origin HEAD

For new branches (first push):

git push -u origin HEAD

Step 3: Verify Push

git status

Confirm: "Your branch is up to date with 'origin/...'"

Error Handling

Error Solution
"rejected" Pull first: git pull --rebase origin <branch>
"non-fast-forward" Rebase required, consult human
"permission denied" Check credentials

Prohibited

  • NEVER use --force or -f flag
  • NEVER push directly to main/master
  • NEVER use git push origin main
push – AI Agent Skills | Claude Skills