Git Project: Reviewed Pull Request
Take a change through issue, branch, pull request, review comments, and merge so the GitHub conversation matches the Git graph.
Take one defect through a GitHub issue, a short-lived feature branch, a pull request, requested changes, a follow-up push, and a merge whose Git graph you can name.
One owned repository
You are author and reviewer on a disposable GitHub repository. The second folder from Two Clone Sync is not required. A fork is not required.
Conversation matches graph
Issue #1 is closed by the merged pull request. Review comments still explain the Pages-URL defect. Local main equals origin/main, and you can name the merge strategy that produced that graph.
Project brief
Unit 5 taught the pieces separately: GitHub Issues, GitHub Pull Requests, GitHub Code Review, a branching model, protection, templates, and contributing habits. This project runs them in order on a repository you own so the GitHub conversation and the Git graph are the same story.
Closes #1.git push.Evidence tracker
Mark a gate complete only after the named command or review proves it. Progress is saved in this browser.
Safety boundary
Disposable repository only
Create a new parent folder named reviewed-pull-request. Never run these commands inside SovranCode, your home directory, or valuable work.
A GitHub remote you own
Create sovrancode-reviewed-pr under your account. Do not open this pull request on a popular public project. Delete the practice repository when the evidence is recorded.
No force-push
Review starts after the first feature commit. git push --force and --force-with-lease on that branch fail this project.
No second clone, no fork
Two Clone Sync already proved matching tips on main. This project moves main through a reviewed pull request. Do not add upstream or a desk folder.
Repository contract
One folder, one origin
Initialize history in clone-card. Origin is the GitHub repository you create. After milestone 1, do not commit the Clone heading on main.
README.md
The only product file. First commit: status that the Clone heading is missing. Feature commits add, then correct, that heading.
Empty GitHub create
No GitHub-generated README, license, or gitignore. Those files would be a different first commit than yours.
GitHub Flow
Short-lived feature/clone-url, reviewed merge, delete the branch. You do not need a develop branch. Actions stay out of this project.
reviewed-pull-request/
└── clone-card/ ← one working copy of a GitHub repository YOU own
GitHub repository (origin): sovrancode-reviewed-pr
This is not a second clone of Two Clone Sync. Stay on a feature branch after the first README.Git records the branch and the commits. GitHub stores the issue, the pull request, and the review comments. git show will not print the request-changes body. Both layers are required evidence.
Required conversation and graphs
Two-parent merge
* Merge pull request #1 (HEAD -> main, origin/main)
|\
| * Use the GitHub Git URL in the Clone section
| * Document how to clone this repository
|/
* Initialize clone cardOne new commit on main
* Document how to clone this repository (HEAD -> main, origin/main)
* Initialize clone cardPick one GitHub merge flag: gh pr merge 1 --merge, gh pr merge 1 --squash, or gh pr merge 1 --rebase. Draw the graph you expect before you merge. Rebase-merge is linear like squash but keeps the feature commit messages; name that if you choose it.
Issue, review, close
Issue #1 is complete. The pull request requested changes, received a follow-up commit, then merged. gh issue view 1 shows closed.
gh pr view 1 --commentsNamed strategy
Local main matches origin/main. The log matches the merge flag you chose. The feature branch is gone from the remote.
git log --oneline --decorate --graph -n 12No force, no main commits
The Clone heading never arrived by git push origin main of the feature. Review was answered with an ordinary push.
git ls-remote origin refs/heads/mainMilestone 1 · Host the clone card
Create the parent folder, initialize only clone-card, commit the README contract, then publish an empty GitHub repository you own. Record the first commit ID. There is no Clone heading yet.
mkdir -p reviewed-pull-request/clone-card
cd reviewed-pull-request/clone-card
git init -b main
git status
# Write README.md from the contract below, then:
git add README.md
git diff --cached
git commit -m "Initialize clone card"
git status
git rev-parse HEAD
git rev-parse --show-toplevel
gh auth status
gh repo create sovrancode-reviewed-pr --public --source=. --remote=origin --push
git remote -v
git branch -vv
git ls-remote origin
git rev-parse HEADStatus only, no Clone command yet
# Clone card
A tiny README that must tell a stranger how to clone this GitHub repository.
## Status
The Clone heading is missing. File an issue, then add it on a feature branch.Do not add Clone on main
The Clone heading belongs on feature/clone-url. If you add it here, reset only if this commit is still unpublished to people you care about—or start a new disposable repo.
Replace OWNER later with your GitHub username. Omit any gh repo create flag that adds a README. If you used the website instead, add origin yourself, then run git push -u origin main. Proof: git ls-remote origin lists the same object as git rev-parse HEAD.
Milestone 2 · File the issue
Stay on main. Open one GitHub issue before you branch. Use the headings GitHub Issues required. If this repository already has a bug template from Collaboration, use it and fill every heading.
gh issue create --title "Clone command is missing or is a Pages URL" --body "$(cat <<'EOF'
## Problem
The README has no Clone heading a stranger can copy, or the command is a GitHub Pages URL.
## Expected result
README.md has a Clone heading whose command is this repository's GitHub Git URL (HTTPS or SSH). A stranger who pastes it can run git clone.
## Reproduction
1. Open README.md on main.
2. Confirm there is no working git clone command, or that the command uses a .github.io host.
3. Note that a Pages URL is a static site, not a Git remote.
EOF
)"
gh issue list
gh issue view 1## Problem
The README has no Clone heading a stranger can copy, or the command is a GitHub Pages URL.
## Expected result
README.md has a Clone heading whose command is this repository's GitHub Git URL (HTTPS or SSH). A stranger who pastes it can run git clone.
## Reproduction
1. Open README.md on main.
2. Confirm there is no working git clone command, or that the command uses a .github.io host.
3. Note that a Pages URL is a static site, not a Git remote.Proof: issue #1 exists on this repository, not on a project you do not maintain. Do not start coding until the issue is filed. The pull request will close this number; if you file two issues, Closes #1 must still name the clone defect.
Milestone 3 · Branch with a planted defect
Create feature/clone-url from current main. Add a Clone heading that uses a GitHub Pages URL on purpose. That defect is the review target. Commit and push the branch. Do not merge yet.
git switch main
git pull origin main
git switch -c feature/clone-url
# Append the planted Clone heading to README.md, then:
git add README.md
git diff --cached
git commit -m "Document how to clone this repository"
git push -u origin feature/clone-url
git branch -vv
git diff main...HEAD --stat## Clone
git clone https://OWNER.github.io/sovrancode-reviewed-pr/Replace OWNER with your username so the Pages host looks plausible. The command must still be wrong: .github.io is a static site host, not a Git remote. git diff main...HEAD --stat must list only README.md.
Milestone 4 · Open the pull request
Open a GitHub pull request from feature/clone-url into main. This is GitHub, not git pull. Fill summary, verify steps, and Closes #1. If a pull request template exists, use it; do not leave Closes # without a number.
gh pr create --base main --title "Document how to clone this repository" --body "$(cat <<'EOF'
## Summary
Adds a Clone heading so a stranger can copy the GitHub Git URL.
## Linked issue
Closes #1
## How to verify
1. Open README.md on this branch.
2. Confirm the clone command uses the GitHub Git URL, not a Pages URL.
3. Confirm no other files changed.
EOF
)"
gh pr list
gh pr view 1
gh pr diff 1## Summary
Adds a Clone heading so a stranger can copy the GitHub Git URL.
## Linked issue
Closes #1
## How to verify
1. Open README.md on this branch.
2. Confirm the clone command uses the GitHub Git URL, not a Pages URL.
3. Confirm no other files changed.Proof: gh pr view 1 shows the issue link and the branch name. gh pr diff 1 still contains the Pages URL. If GitHub says the pull request can be merged, that is not review. You have only proposed.
Milestone 5 · Request changes
You are the reviewer now. On GitHub, Files changed, leave a line comment on the clone command. Then submit an overall verdict. Review comments are GitHub conversation data, not Git objects.
gh pr diff 1
gh pr view 1 --comments
gh pr review 1 --request-changes --body "$(cat <<'EOF'
The Clone section still uses a Pages URL.
That address is a static site host, not a Git remote. A stranger who copies it cannot git clone this repository.
Please change the command to the GitHub Git URL, then push the fix to this same branch.
EOF
)"Proof: gh pr view 1 --comments includes the request. Approving now fails the project. Do not merge. Do not open a second pull request.
Milestone 6 · Answer with an ordinary push
Stay on feature/clone-url. Replace the Pages URL with the GitHub Git URL. Commit and git push. Do not force-push. Reviewers already have the first commit.
# Stay on feature/clone-url. Do not switch to main.
# Edit README.md so git clone uses the GitHub Git URL, then:
git add README.md
git diff --cached
git commit -m "Use the GitHub Git URL in the Clone section"
git push
gh pr view 1 --comments
gh pr diff 1
# These rewrite history reviewers already read. Do not run them:
# git push --force
# git push --force-with-lease## Clone
git clone https://github.com/OWNER/sovrancode-reviewed-pr.gitHTTPS or SSH is fine if it is this repository's Git remote. Proof: gh pr diff 1 no longer contains .github.io, and the pull request still has two feature commits (unless you already chose squash-only locally—which you must not; leave both commits on the branch).
Milestone 7 · Merge and prove the graph
Approve, then merge with one flag you can justify. Update local main from origin. Delete the feature branch locally and on the remote. Confirm the issue closed.
gh pr review 1 --approve --body "Clone command now uses the GitHub Git URL. Verified on this branch."
# Pick ONE. Draw the graph before you run it.
gh pr merge 1 --merge
# gh pr merge 1 --squash
# gh pr merge 1 --rebase
git fetch origin
git switch main
git pull origin main
git log --oneline --decorate --graph -n 12
git rev-parse HEAD
git ls-remote origin refs/heads/main
git branch -d feature/clone-url
git push origin --delete feature/clone-url
git branch -vv
gh pr view 1
gh issue view 1If GitHub Branch Protection already refuses git push origin main, that is expected: the pull request was the legal path. Do not turn on two-reviewer lockout on a solo repo. Required Actions checks are GitHub Actions.
Proof: git rev-parse HEAD equals the object from git ls-remote origin refs/heads/main. gh issue view 1 is closed. The log matches the flag you chose. Status is clean.
git rev-parse --show-toplevel
git remote -v
git status
git fetch origin
git switch main
git pull origin main
git log --oneline --decorate --graph -n 12
git branch -vv
git rev-parse HEAD
git ls-remote origin refs/heads/main
gh pr view 1
gh pr view 1 --comments
gh issue view 1Required failure drills
Requested changes before approve
Milestone 5 is the drill. An approve-and-merge with no request-changes body fails the review contract.
Ordinary push, no force
Milestone 6 is the drill. Save git log --oneline main..feature/clone-url showing two commits after the fix.
Wrong merge story
If you ran --squash but your notes say two parents, the project fails the graph gate. Rewrite the notes, not the remote history.
Issue still open
If Closes #1 was missing or named the wrong number, the issue stays open. Fix the pull request body before merge, or close it with a comment that names the miss and the number you actually closed.
Evidence package
- Path from
git rev-parse --show-toplevelandgit remote -vfor the GitHub repository you own. - Issue #1 body with problem, expected result, and reproduction.
gh pr view 1andgh pr diff 1from before the fix, showing the Pages URL.- Request-changes body and the follow-up commit ID from
git log --oneline main..HEAD(or the equivalent range before you deleted the branch). - The merge flag you chose, a sketch of the graph, and
git log --oneline --decorate --graph -n 12after pull. - Matching SHAs from
git rev-parse HEADandgit ls-remote origin refs/heads/main, plusgh issue view 1showing closed.
Self-assessment rubric: 25 points
5 · Issue first
Complete GitHub issue on a repository you own, filed before the feature branch.
5 · Proposed change
Short-lived branch, planted Pages URL, pull request with summary, verify steps, and Closes #1.
5 · Review conversation
Line comment plus gh pr review --request-changes; comments live on GitHub, not in git show.
5 · Follow-up and merge
Ordinary git push, then gh pr review --approve and one named gh pr merge flag.
5 · Final audit
Matching SHAs, closed issue, deleted feature branch, clean status, complete evidence package.
Automatic stop
Force-push, someone else's repository, a fork used as busywork on a famous project, pasted secrets, or merging without requested changes requires rebuilding safely.
Project checklist
- I filed one complete GitHub issue on a repository I own, then branched.
- I opened one pull request with
Closes #1and a planted Pages URL for review to catch. - I requested changes, then answered with
git pushon the same branch, not force-push. - I merged with a flag whose graph I can name, updated local
main, and closed the issue through GitHub. - I never used a popular project as the lab or treated
git pullas the pull request.
Final audit commands
git rev-parse --show-toplevel
git remote -v
git status
git fetch origin
git switch main
git pull origin main
git log --oneline --decorate --graph -n 12
git branch -vv
git rev-parse HEAD
git ls-remote origin refs/heads/main
gh pr view 1
gh pr view 1 --comments
gh issue view 1Those commands answer one question: does the GitHub conversation (issue, review, merge) describe the same history as local main and origin/main? When they do, the unit project is complete. A check reviewers can trust is GitHub Actions.