Handover and documentation
Understand the idea
A handoff is a commit whose message and file tell the next person where to start.
The idea
The README change is an ordinary snapshot. The message says why the next person should open it. Nothing about the is special except the words you chose.
What changes
git add README.md stages the note. The commit moves your branch. The other repository does not see it until you push or they fetch a pull request that contains it.
| Place | Survives the handoff | Where they look |
|---|---|---|
| README in the commit | Yes | git show |
| The commit message | Yes | git log |
| A sentence you only said aloud | No | Nowhere in the repository |
The command
Write the handoff in README.md. git add README.md, then git commit -m "hand off the fork notes". git show HEAD prints the file.
The mistake
Check your graph
The new commit is on your branch, and git show prints the handoff note.
Your repository
Commit a README note that says what the branch is for and what to read next.
Step 1
Write the handoff
In the editor, set README.md to: Handoff: class-notes explains the fork. Next person should read the pull request before merging.
Step 2
Stage the note
This is an ordinary file commit.
Step 3
Commit the handoff
The message says why the next person should care.
Step 4
Read it back
git show is the file the next person will open.
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.