git-push-origin

Push a local branch to origin to initialize it on the remote (GitHub).

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "git-push-origin" with this command: npx skills add pc-style/pc-skills/pc-style-pc-skills-git-push-origin

Git Push Origin

Push a local branch to origin to initialize it on the remote (GitHub).

When to Use

  • New branch needs to exist on GitHub

  • First push of a local branch

  • Setting up remote tracking

  • Any request to "push branch to origin" or "init branch on GitHub"

Workflow

  1. Check Current State

git status git branch --show-current git remote -v

  1. Push with Upstream Tracking

First push (initialize on origin):

git push -u origin <branch-name>

Or using the current branch:

git push -u origin HEAD

  1. Verify Remote Branch

git branch -vv git log --oneline --graph --decorate -5

Common Scenarios

Push current branch for the first time:

git push -u origin HEAD

Push specific branch:

git push -u origin feature/my-feature

Push after making commits:

git add . git commit -m "feat: initial implementation" git push -u origin HEAD

What -u (Upstream) Does

The -u flag sets up tracking between local and remote branch:

  • Future pushes can use just git push

  • Future pulls can use just git pull

  • Shows tracking info in git branch -vv

Best Practices

  • Always use -u on first push to set upstream

  • Push after initial commit(s) to back up work

  • Verify branch appears on GitHub

  • Ensure you're on the correct branch before pushing

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

code-review

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

explore-codebase

No summary provided by upstream source.

Repository SourceNeeds Review
General

blog-post

No summary provided by upstream source.

Repository SourceNeeds Review
General

load-handoff

No summary provided by upstream source.

Repository SourceNeeds Review