๐ WAYPOINT LESSON
.gitignore and history hygiene
โญ beginnerโณ 12 min read๐ Lesson 76 of 85
What belongs in version control: source yes, build output no โ and messages that explain why.
What gets ignored
bin/
obj/
*.user
Build outputs (bin/, obj/) are regenerable โ committing them bloats every clone and breeds merge conflicts on binary files. Machine-local settings (*.user) don't describe the project. The test for what to commit: can a teammate rebuild the world from what's checked in? Source, project files, and configuration yes; artifacts no.
Messages that explain why
Fix off-by-one in SumRange
The exclusive upper bound was treated as inclusive after the
refactor; SumRange(1,5) returned 15 instead of 10.
A good message has a subject line (imperative, ~50 chars) and, when needed, a body explaining why โ the diff already shows what. "fix bug" describes nothing; six months later, nobody (including you) knows which bug or why it happened.
โก Now practice
Ready to CodeWorkflow workshopCommit graphs, merge reasoning, ignore semantics, and message hygiene โ workflow as testable code.
4 challenges ยท ยท ~40 min