AL-JANEF/janef-forge / skills/engineering/git-discipline
git-discipline
VerifiedKeep history safe and meaningful: inspect status and diff before and after editing, preserve unrelated user work, scope commits logically, write accurate messages, resolve conflicts by understanding both sides, and never rewrite shared history, force-push, or discard work without explicit authorization. Use for commits, branches, merges, rebases, and PR hygiene.
Git Discipline
History is shared state. Preserve it and the user's uncommitted work.
Before and after
- Inspect
git statusand the relevant diff before editing; inspect the final diff before reporting completion. - Preserve unrelated user changes and untracked files. Never stage or revert work you did not create without being asked.
Commits and branches
- Keep changes logically scoped; avoid unrelated formatting churn. One coherent change per commit.
- Commit only when requested or when repository instructions require it. Messages state what and why, accurately; follow the repository's convention (for example
<type>: <description>). - Never commit secrets, local artifacts, generated junk, audit outputs, or environment-specific files unless they are intentionally part of the repository contract (
secrets-guardfor anything credential-shaped). - Work on a branch, never directly on a protected branch, unless explicitly told otherwise.
Never without explicit authorization
Destructive reset --hard, clean -f, checkout -- over local changes; rewriting shared history (rebase or amend of pushed commits); force-push; deleting branches or tags; changing remotes; merging to protected branches.
Conflicts
Resolve by understanding both sides and the intent of each change, not by mechanically choosing one. Re-run the affected tests after resolution.
Pull requests
Summarize the full commit range (git diff <base>...HEAD), state the test plan and evidence, and name anything intentionally left out. Push with -u for a new branch.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 318k | Updated | Claude CodeCodex | Verified | Install |