Tech Update / Adventures with Claude Code #35
Commits and pull requests – Claude helps write the history
git log in a project under time pressure: "fix", "wip", "another fix", "now for real". We all know it. We have all written it.
Claude has read the diff anyway. So it can also write down what changed and why.
✍️ The commit
Commit the changes with a descriptive message.
Claude looks at the diff, stages the files and writes the message. Prefixes, ticket number, language of the message: conventions like these go into CLAUDE.md once (part 4), not into every prompt.
With a large working state it pays to add "in logically separate commits".
🔀 The pull request
With the gh CLI installed, "Open a PR" is enough. The description comes from the actual changes, with notes on what was tested and how, if you want them.
👀 Look before you commit
/diff shows every change in the working tree, including Claude's. And before the PR, /code-review is worth running (part 19).
🔧 After the PR
/autofix-pr starts a cloud session that watches the PR. If CI fails or a reviewer comments, Claude deals with it and pushes the fix. It needs the gh CLI, the Claude GitHub App on the repository and access to cloud sessions (more on those in part 39).
🏷️ Who wrote it?
Claude Code adds a note to commits and PRs saying Claude was involved. The attribution setting lets you change or hide that text. Agree in the team on what you want.
A word of caution:
Committing is harmless, pushing not always. For us, git push still asks (part 7), and auto mode (part 30) blocks force pushes of its own accord. With /autofix-pr, Claude also replies to comments under your GitHub name. If you have automation that reacts to PR comments, you should know that beforehand.
My rule of thumb:
- Conventions go into
CLAUDE.mdonce. /difffirst, then commit.- Push and merge remain a deliberate decision.
Deutsch
English