Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

push

БесплатноБез исполняемых скриптовНе проверен

Comprehensive Git push operations including basic push, force push safety protocols, tag pushing, remote management, and troubleshooting. Use when pushing…

Prorise-coolот Prorise-cool★ 304 звезды на GitHub

Об этом скилле

Git Push

Comprehensive guidance for Git push operations, from basic pushes to force push safety protocols and remote management.

Overview

This skill provides complete guidance for Git push operations, emphasizing safety protocols (especially for force pushes), remote management, and troubleshooting common push scenarios. It complements the git-commit skill (which handles commit creation) by focusing exclusively on push operations and remote synchronization.

When to Use This Skill

This skill should be used when:

  • Pushing commits - Basic push operations to remote repositories
  • Force pushing - Rewriting history with safety protocols (force-with-lease)
  • Pushing tags - Annotated tags, lightweight tags, tag workflows
  • Managing remotes - Adding, removing, renaming, configuring remote repositories
  • Troubleshooting pushes - Rejected pushes, conflicts, authentication issues
  • Upstream configuration - Setting up tracking branches, push.autoSetupRemote
  • Branch protection - Understanding protected branches and push restrictions

Trigger keywords: push, force push, force-with-lease, remote, upstream, tracking branch, rejected push, push --force, git push origin, push tags, remote add

Prerequisites

This skill assumes:

  • Git is installed (verify with git --version)
  • Repository initialized (local repo with .git/ directory)
  • Remote configured (typically origin for GitHub/GitLab/Bitbucket)
  • Basic Git knowledge (commits, branches, remotes)

For Git installation help, see the setup skill.

Quick Start

Basic Push

# Push current branch to remote (if upstream is configured)
git push

# Push and set upstream for first-time push
git push -u origin feature-branch

# Push specific branch to remote
git push origin main

Safe Force Push

# Safe force push (recommended - only overwrites if no one else pushed)
git push --force-with-lease

# Safest force push (recommended for maximum safety)
git push --force-with-lease --force-if-includes

# Force-with-lease for specific branch
git push --force-with-lease origin feature-branch

Push Tags

# Push specific tag
git push origin v1.0.0

# Push all tags
git push --tags

# Push commits + annotated tags pointing to them
git push --follow-tags

Core Capabilities

1. Basic Push Operations

Push local commits to remote repositories for collaboration and backup.

Essential commands:

# Push current branch (upstream must be configured)
git push

# Push and set upstream (first-time push)
git push -u origin feature-branch

# Push specific branch
git push origin main

# Dry run (preview without pushing)
git push --dry-run

📖 For detailed configuration: See references/push-configuration.md for upstream setup, push strategies, and advanced options.


2. Force Push Safety Protocols

Rewrite remote history safely when necessary (after rebasing, amending, or squashing commits).

CRITICAL SAFETY RULES:

  • ✅ ONLY force push on feature branches (your personal work)
  • ✅ ALWAYS use --force-with-lease (not --force)
  • ❌ NEVER force push to main/master/develop (shared branches)
  • ❌ NEVER force push if others are working on the same branch

Safe force push commands:

# ✅ SAFE: Only overwrites if no one else pushed since your last fetch
git push --force-with-lease

# ✅ SAFEST: Maximum safety with force-if-includes
git push --force-with-lease --force-if-includes

📖 For comprehensive safety guidance: See references/force-push-safety.md for detailed safety protocols, pre-push checklist, recovery procedures, and branch protection.


3. Tag Pushing

Push version tags to remote for releases and milestones.

Quick commands:

# Create and push annotated tag (recommended for releases)
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0

# Push all tags
git push --tags

# Push commits + annotated tags (recommended)
git push --follow-tags

📖 For complete tag workflows: See references/tag-pushing.md for tag types, strategies, aliases, and best practices.


4. Remote Management

Configure and manage remote repositories for push/fetch operations.

Quick commands:

git remote -v                    # List remotes
git remote add origin <url>      # Add remote
git remote set-url origin <url>  # Change URL
git remote rename origin upstream # Rename remote

📖 For detailed remote management: See references/remote-management.md for configuration, fork workflows, and credential management.


5. Troubleshooting Push Issues

Diagnose and resolve common push failures and conflicts.

Common issues - quick fixes:

# Rejected push (non-fast-forward)
git pull --rebase && git push

# Authentication failure
ss
Полный SKILL.md на GitHub

Установить push в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Bash
Glob
Grep

Вложенные файлы

references/best-practices.mdreferences/force-push-safety.mdreferences/push-configuration.mdreferences/remote-management.mdreferences/tag-pushing.mdreferences/troubleshooting.mdreferences/workflows.md

FAQ

Что делает скилл push?

Comprehensive Git push operations including basic push, force push safety protocols, tag pushing, remote management, and troubleshooting. Use when pushing commits, managing remotes, pushing tags, resolving push conflicts, handling rejected pushes, or dealing with force push scenarios. Covers push strategies, branch protection, upstream configuration, and push --force-with-lease best practices.

Как установить скилл push?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл push запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить push с