Issues and pull requests
Understand the idea
An issue is a written problem. A pull request is a proposed diff plus the conversation about it.
The idea
An issue is stored on the , not in the terminal scrollback. A names a source branch, a target branch, and a title. Opening it does not merge. The diff is the commits on the source that the target does not yet have. The conversation, including reviews, hangs on that request.
What changes
git issue new "Empty login fails" inserts a numbered issue row. git pr new topic main "Handle empty login" inserts a pull request whose review comments start empty. The branch labels do not move. The graph is unchanged until someone merges.
| Object | What it stores | What it does not do |
|---|---|---|
| Issue | A title, a body, and an open status | Change files |
| Pull request | Source, target, title, and comments | Merge by itself |
| Merge commit | Two parents and a snapshot | Hold the review conversation |
The command
On your repository, run git issue new "Empty login fails". Then commit on a branch and run git pr new topic main "Handle empty login". Both rows belong to this repository. The next lesson writes a review onto that request.
The mistake
Check your graph
The graph should look the same as before the issue and the pull request. What changed is the repository's issue list and the open request from topic into main.
Your repository
Open an issue and a pull request on your repository. They stay in this platform's tables.
Step 1
Branch for the fix
The pull request will propose this branch. If it already exists, run git switch fix-empty-login.
Step 2
Describe the fix in a file
Create login.txt in the editor and set the text to: Reject an empty login
Step 3
Stage the fix
The pull request will show this commit’s diff.
Step 4
Commit the fix
fix-empty-login now has a commit main does not have.
Step 5
Open the issue
The issue is a written problem on this repository. The branch does not move.
Step 6
Open the pull request
This proposes fix-empty-login into main. It does not merge.
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 150 XP. You can always revisit it.