Skip to main content

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

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

FlagDescription
-m, --message <msg>Commit message (default: "Update skills")
--dry-run, -nPreview without making changes

Prerequisites

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

# If not initialized yet:
skillshare init --remote [email protected]:you/my-skills.git

# Or manually:
cd ~/.config/skillshare/skills
git init
git remote add origin [email protected]:you/my-skills.git

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