Code review
Understand the idea
Review comments live on the pull request. Requesting changes means the diff is not ready to merge.
The idea
git review "Please rename the helper" appends that comment to the latest and marks the request as changes requested. The comment is not a commit, and it is not a chat line that disappears when you clear the terminal. The author updates the branch with new commits. The reviewer looks at the new diff.
What changes
The request's review list grows by one entry: author, body, and a request for changes. The tip does not move. A later commit on the source branch updates the diff the request is about. Merging still waits until someone decides the conversation is done.
| Place | Survives reload | Changes the files |
|---|---|---|
| Terminal scrollback | No | No |
| Review on the pull request | Yes | No |
| A new commit | Yes | Yes |
The command
Open a pull request first. Then run git review "Please rename the helper so it says what it checks". The request status becomes changes requested. Push more commits on the source branch if you are the author. Those commits are the response. The comment stays on the request.
The mistake
Check your graph
HEAD is where it was. The new fact is on the pull request: a stored comment, and a status that says the diff is not ready to merge.
Your repository
Leave a review comment on your pull request and read it back as part of the request, not as a chat log.
Step 1
Leave the review on the request
Open the pull request in the previous lesson first. This comment is stored on that request, not in the terminal history.
Step 2
Answer with a commit
In the editor, change login.txt to: Reject an empty login before submit
Step 3
Stage the response
The review comment stays on the pull request. This command stages the new text.
Step 4
Commit the response
The diff moves. The comment is still on the request.
The editor edits the working tree. Start a repository and the files appear here.
Commit graph
No commits yet. git init creates the first one.
Quiz
A quick check for understanding. Retry as often as you like; your learning path stays open.
Ready to call this one understood?
Mark this lesson complete to earn 200 XP. You can always revisit it.