← ClaudeAtlas

padosoft-git-commit-integritylisted

Use this skill right after committing, and whenever something that works locally is missing or wrong everywhere else: a file you are certain you added is not in the repository, CI cannot find a module that exists on your machine, a colleague gets a whole-file diff from a one-line change, a review shows changes nobody made, or a generated file keeps coming back modified. It verifies what git actually recorded — `git add -A` skips ignored files in silence, and without a .gitattributes the line endings of whoever committed end up in the index — and gives the correct fix for each, which is never `git add -f`. Do not use it for merge conflicts, rebasing, branch strategy, or writing commit messages.
padosoft/skills · ★ 1 · Code & Development · score 80
Install: claude install-skill padosoft/skills
# Git commit integrity **What git recorded is not always what you changed.** Two failures produce that gap, both invisible on the machine that made the commit, both cheap to check and expensive to find later: 1. files you believe you committed and that are **not there**; 2. files that are there but **differ** from what you wrote. --- ## 1. After every commit: look at what went in ```bash git show --stat HEAD ``` Compare the file count against the list of what you meant to change — new plus modified. **If the count does not add up, investigate before pushing.** This takes two seconds and is the only moment at which the next failure is cheap. ## 2. Files missing from the commit **`git add -A` skips the files excluded by `.gitignore` in silence.** No error, no warning, exit code 0. The shape to recognise: a generic `logs/` pattern, written for runtime logs, swallows a **source** directory that happens to be called `logs/`. Build, server and tests stay green locally — the files are simply absent from the commit, so the feature does not exist for anyone else. ```bash git status --short # what is still outside, compared with what you expected git check-ignore -v path/to/file # prints the .gitignore line responsible ``` The fix is a **negation in `.gitignore`**, next to the rule that caused it: ```gitignore logs/ !**/otel/logs/ # sources, not runtime logs ``` ⚠️ **Not `git add -f`.** It puts this one file in and leaves the trap armed for every futu