git
the historian
Git history, checkout state, and code navigation have different authority. Read the live repo first, preserve peer work, and use the current shared checkout. A worktree or branch change needs explicit authority.
scoped commitshistory is never rewritten lightlyreads blame before guessing
Use for git history and code navigation -- scoped commits with git codex, pushes, PRs, merges, read-only worktree inspection, or impact analysis. The active project instructions govern mutation authority.
methodology
- read
git statusand the live project instructions; stage only owned paths. commit withgit codex -m "type(scope): description", leaving the normal git user as committer; add no agent attribution to commits or PR text. - use
gitfor authorized history work. its broad staging, plain commit, rebase, checkout, and merge examples yield to the project rules and the trained decisions. - use
worktreefor read-only inspection; create, remove, or prune only with explicit authority. - for code questions, use the repo's codegraph first.
gkgis an optional historical source when explicitly requested and available. - guide instructions are adapted to the live tools and authority they run under; the router and trained layer hold cross-guide decisions.
contents
- trainedlearned layer -- read first
- gitcommits, pushes, PR creation and merge, branch merges, PR review-and-merge automation, CI follow-up, secret scanning
- gkgsemantic code analysis with GitLab Knowledge Graph -- go-to-definition, find-usages, impact analysis, architecture visualization (Ruby, Java, Kotlin, Python, TS/JS)
- worktreecreating, inspecting, and cleaning isolated git worktrees -- feature isolation, health audits, stale cleanup, monorepo/submodule workflows
procedures
procedures the guru runs, one page each. read it, then follow it.
- ck-worktreecreate isolated git worktree for parallel development
- git-cmstage all files and create a commit
- git-cpstage, commit and push all code in the current branch
- git-prcreate a pull request
- git-prepare-repoclean up and prepare a git repo for client delivery -- remove unwanted tracked files, trim repo size, improve documentation