ops/git-remote

Enforce pre-push checks for commit hygiene and force-push safety.

3|1|Updated Feb 10, 2026
One-click install
npx skills add https://github.com/deandum/claude-resources --skill ops-git-remote
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ops/git-remote
Source: https://github.com/deandum/claude-resources/tree/main/skills/ops/git-remote
Command: npx skills add https://github.com/deandum/claude-resources --skill ops-git-remote

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Remote git pushes can cause irreversible changes or disrupt collaboration if done without guardrails. This skill enforces a disciplined push protocol, including validating commits, setting upstream tracking, and governing force-push and tag publication to protect workflows.

Core Features & Use Cases

  • Enforces pre-push checks for commit hygiene and base-branch alignment.
  • Governs force-push safety with explicit policies (e.g., force-with-lease) and protected-branch awareness.
  • Manages upstream tracking and tag publication to prevent accidental exposure of incomplete work.
  • Applies to first pushes, updates to shared branches, and tagging workflows in team projects.

Quick Start

Review your local branch, ensure commits are clean, and push to origin only after confirming upstream tracking and safety rules.

Frequently Asked Questions about ops/git-remote

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

FAQPage Schema
How do I enforce safe git pushes to remote branches?

Safe git pushes require pre-push checks for commit hygiene and base-branch alignment. You enforce upstream discipline by validating commits, setting explicit upstream tracking, and using --force-with-lease to prevent overwriting remote changes.

What is force-with-lease and when should I use it for branch management?

Force-with-lease is a git push safeguard that prevents overwriting commits when updating remote branches. Use it instead of standard force-push to protect collaborative workflows, ensuring you only overwrite remote branches if your local refs match the remote state.

How do I set upstream tracking for a new git branch?

Setting upstream tracking requires explicit configuration during your initial git push. You establish the remote branch relationship by validating commit hygiene first, then pushing with correct base-branch alignment to prevent accidental exposure of incomplete work.

Does this git push workflow support publishing tags in protected branch projects?

Yes, the git push workflow governs tag publication in collaborative projects with protected branches. It manages tag updates alongside branch management, ensuring pre-push checks validate commit hygiene and base-branch alignment before any tag publication occurs.

What are the limitations of using force-push safeguards in collaborative git workflows?

Force-push safeguards using --force-with-lease limit protection to local ref verification and do not prevent conflicts when remote branches diverge significantly. You should avoid standard force-push entirely on protected branches to maintain collaborative workflow integrity.