git-scripting

Community

Use git safely in scripts and Makefiles.

Authorchristophevg
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Prevents broken or unsafe automation when running git commands by ensuring scripts check the right state (current branch, upstream availability, dirty/unstaged changes) instead of producing false positives or pushing unintentionally.

Core Features & Use Cases

  • Safe push gating: Uses commit-ahead checks against the current branch’s upstream to decide whether a push should happen.
  • Repository-state detection: Detects uncommitted changes, untracked files, detached HEAD, and whether a directory is a git repository (including worktrees).
  • Makefile correctness: Applies Makefile-specific practices like escaping dollar signs and using proper phony targets to avoid subtle shell/variable bugs.
  • Use Case: You want a Makefile target that scans multiple repo folders, pushes only those with commits ahead of upstream, and prints helpful branch/ahead information without spamming errors.

Quick Start

Ask for git-scripting guidance to write a Makefile target that pushes only the current branch when it is ahead of its upstream and skips repos that are missing upstream or have no git checkout.

Dependency Matrix

Required Modules

None required

Components

Standard package

đŸ’» Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: git-scripting
Download link: https://github.com/christophevg/c3/archive/main.zip#git-scripting

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.