git-workflow

Verify working-tree state and enforce staging and commit hygiene.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/oElberte/dotfiles --skill git-workflow-oelberte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: git-workflow
Source: https://github.com/oElberte/dotfiles/tree/main/private_dot_factory/skills/git-workflow
Command: npx skills add https://github.com/oElberte/dotfiles --skill git-workflow-oelberte

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents accidental loss, leakage, and messy history by enforcing a clear, state-aware Git workflow before staging, committing, merging, or pushing.

Core Features & Use Cases

  • Working-tree safety first: Run git status --porcelain before state-dependent operations and treat untracked files as user-owned.
  • Traceable staging and review: Inspect git diff --cached and review both unstaged and staged changes before committing.
  • Guardrails for confidentiality and correctness: Avoid committing secrets, .env, credentials, logs, and build outputs; follow Conventional Commits; never push unless explicitly requested; use local excludes via .git/info/exclude for personal-only ignores.

Quick Start

Use the git-workflow skill to check that what you plan to stage and commit matches your intent and includes no secrets or unintended files.

Frequently Asked Questions about git-workflow

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

FAQPage Schema
How do I prevent committing secrets and sensitive files in git?

To prevent committing secrets in git, inspect staged changes with `git diff --cached` and avoid staging `.env`, credentials, logs, and build outputs. Use `.git/info/exclude` for local-only ignores to keep sensitive files untracked without modifying the shared `.gitignore`.

What is the safest way to stage and commit changes in git?

The safest way to stage and commit in git is to first run `git status --porcelain` to verify the working-tree state, inspect `git diff --cached` for traceability, and format messages using Conventional Commits for clear history.

How do I check my git working-tree state before merging or branching?

Check your git working-tree state before merging or branching by running `git status --porcelain`. This verifies tracked and untracked files, treating untracked files as user-owned to prevent accidental loss during state-dependent operations.

Does git workflow automatically push my commits to the remote repository?

No, a disciplined git workflow does not automatically push commits. It enforces a hard rule against pushing to the remote repository unless explicitly requested by the user, ensuring all changes are deliberate and safe.

When should I use local excludes instead of `.gitignore` in git?

Use local excludes via `.git/info/exclude` in git for personal-only ignores that should not be shared with the team. This prevents sensitive or environment-specific files from being tracked without modifying the repository's shared `.gitignore` file.

What are the limitations of enforcing strict git commit hygiene?

Strict git commit hygiene requires explicit `git status --porcelain` checks and manual review of staged changes before every commit. This deliberate workflow may slow down rapid prototyping but ensures traceable staging and prevents accidental leakage.