Use when running git operations or resolving repo-state issues. Triggers on prompts about commit messages, conventional commits (feat/fix/chore/docs), merge conflicts, rebases, worktrees, feature-worktree create / merge / abandon / cleanup, branch cleanup, or history rewrites, even when the user doesn't say 'git'.
Installation
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Use when running git operations or resolving repo-state issues. Triggers on prompts about commit messages, conventional commits (feat/fix/chore/docs), merge conflicts, rebases, worktrees, feature-worktree create / merge / abandon / cleanup, branch cleanup, or history rewrites, even when the user doesn't say 'git'.
Git Guidelines
Core Principles
Conventional Commits - Use type prefixes (feat, fix, chore, docs, refactor, test, ci), see references/commit.md
Auto-Generate Messages - Analyze changed files and context, see references/commit.md
Push + rebase-onto-base - Publish a branch upstream and keep its PR / MR diff just this change; the host skill (github-guide / gitlab-guide) drives the PR itself, see references/push.md
git pull is fetch + merge — on a shared branch this creates spurious merge commits; prefer pull --rebase or fetch then explicit merge
Detached HEAD: committing in this state silently loses commits when you checkout away — note the SHA or branch immediately
git rebase rewrites history; force-pushing to a shared branch overwrites teammates' work — never force-push to main/master
Hooks in .git/hooks/ are not version-controlled — share via core.hooksPath pointing at a tracked directory
.gitignore only ignores untracked files; already-tracked files need git rm --cached to stop tracking
A feature worktree-merge integrates a branch into its parent branch; landing on the mainline goes through push + PR + CI review, never a direct local merge to main
Long-lived feature branches drift and conflict — keep them short-lived; integrate work spanning sessions incrementally behind feature flags / branch-by-abstraction
Deleting a worktree directory by hand leaves a stale admin entry — run git worktree prune; and each worktree needs its own dependency install (node_modules is not shared across worktrees)
Progressive Disclosure
Commit Operations
Read references/commit.md - Load when committing changes with auto-generated conventional messages
Read references/push.md - Load when publishing a branch upstream and rebasing it onto the base before opening a PR / MR