Files
skillshare/website/docs/commands/push.md
T
Willie f16a28d678 docs: restructure website documentation with scenario-driven navigation
- Add version command page and fix commands index (missing check, trash, hub)
- Document target aliases and XDG base directory layout
- Rewrite all 9 section index pages with "What do you want to do?" tables
- Standardize all 24 command docs with "When to Use" and "See Also" sections
- Enhance intro with role-based paths (individual / team / migration)
- Add "What Just Happened?" explainer to first-sync getting-started page
- Add practical context callouts (:::tip) to all concept pages
- Add See Also cross-references to all guide and workflow pages

59 files changed, 547 insertions(+), 163 deletions(-)
2026-02-16 17:01:06 +08:00

4.8 KiB

sidebar_position
sidebar_position
1

push

Commit and push source to git remote.

skillshare push                  # Auto-generated message
skillshare push -m "Add pdf"     # Custom message
skillshare push --dry-run        # Preview

When to Use

  • Share skill changes with your other machines via git
  • Back up your skills to a remote repository
  • After editing skills, commit and push in one command

What Happens

┌─────────────────────────────────────────────────────────────────┐
│ skillshare push -m "Add pdf skill"                              │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│ 1. Check repository status                                      │
│    → Source is a git repo: ✓                                    │
│    → Remote configured: ✓                                       │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│ 2. Stage all changes                                            │
│    → git add -A                                                 │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│ 3. Commit                                                       │
│    → git commit -m "Add pdf skill"                              │
└─────────────────────────────────────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│ 4. Push to remote                                               │
│    → git push                                                   │
└─────────────────────────────────────────────────────────────────┘

Options

Flag Description
-m, --message <msg> Commit message (default: "Update skills")
--dry-run, -n Preview without making changes

Prerequisites

Your source directory must be a git repository with a remote:

# Set up during init (recommended):
skillshare init --remote git@github.com:you/my-skills.git

# Or add remote to existing setup:
skillshare init --remote git@github.com:you/my-skills.git

Init automatically creates the initial commit, so push works immediately after setup.

Examples

# Quick push with auto message
skillshare push

# Custom commit message
skillshare push -m "Add commit-commands skill"

# Preview what would be pushed
skillshare push --dry-run

Conflict Handling

If the remote has newer commits:

$ skillshare push
Push failed
  Remote may have newer changes
  Run: skillshare pull
  Then: skillshare push

Solution:

skillshare pull    # Get remote changes
skillshare push    # Push your changes

Workflow

Typical workflow for sharing skills:

# 1. Make changes to skills
# 2. Push to remote
skillshare push -m "Update my-skill"

# On another machine:
skillshare pull    # Gets changes and syncs

See Also