git-push

Pushes local Git commits to remote repositories while enforcing Git Flow branch protection rules.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill git-push-velkaressiablutkrone
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-push
Source: https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng/tree/main/.claude/skills/git-push
Command: npx skills add https://github.com/VelkaressiaBlutkrone/spring-python-llm-exam-mng --skill git-push-velkaressiablutkrone

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Pushing code to a shared repository carries risks: accidentally pushing directly to protected branches like main or master, force-pushing over teammates' commits, or pushing with uncommitted changes. This Skill enforces a safe, checklist-driven push workflow aligned with Git Flow conventions. ## Core Features & Use Cases - Branch Rule Enforcement: Dynamically detects the main branch (main or master) and blocks direct pushes to it, redirecting users to pull requests instead. - Pre-Push Checklist: Shows current branch, commits to be pushed, remote configuration, and uncommitted changes before executing any push. - Safe Force Push Handling: Recommends --force-with-lease over --force and refuses force pushes to protected branches entirely. - Use Case: A developer finishes work on a feature branch and says "푸시해줘" (push it). The Skill verifies the branch is feature/*, lists the 3 commits to be pushed, confirms no uncommitted changes exist, and runs git push -u origin with upstream tracking. ## Quick Start Ask the assistant to push your current branch to the remote by saying "push my commits" or "/git-push".

Frequently Asked Questions about git-push

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely push a feature branch to a remote Git repository?▼

Verify your current branch with git branch --show-current, review commits with git log --oneline, then run git push -u origin branch-name for the first push. The -u flag sets upstream tracking so future pushes need only git push.

Why should I not push directly to the main or master branch?▼

Direct pushes to main bypass code review and can break the shared codebase for all collaborators. Git Flow convention requires merging changes through pull requests so teammates can review, test, and approve changes first.

What is the difference between git push --force and --force-with-lease?▼

The --force flag overwrites remote history unconditionally, potentially destroying teammates' commits. The --force-with-lease flag only succeeds if the remote matches your last known state, preventing accidental overwrites of others' work.

What should I do when I have uncommitted changes before pushing?▼

Uncommitted changes are not included in a push since push only transfers commits. Either commit them first with git add and git commit, or push only the existing commits and handle the working changes separately.

When is a force push acceptable in Git?▼

Force pushes are acceptable only on personal feature branches after operations like rebase or commit amend that rewrite local history. They should never be used on shared branches like main, master, or develop, and --force-with-lease is always preferred.