C.W.K.
Stream
Lesson 04 of 05 · published

git commit: 미래 탐색용 메시지

~20 min · commit, messages

Level 0Untracked 새싹
0 XP0/47 lessons0/14 achievements
0/100 XP to next level100 XP to go0% complete

commit 메시지는 미래의 너를 위한 navigation

6개월 뒤 새벽 2시, 뭔가 망가질 거야. git log -p -- offending-file 돌리고 그 파일을 건드린 모든 commit 의 메시지를 읽겠지. 5분 만에 원인 찾느냐 2시간 헤매느냐는 거의 전적으로 과거의 네가 남긴 메시지에 달려 있어. "fix stuff", "wip", "asdf", "save" — 이건 commit 메시지가 아니야, 포기야.

관습적 모양이 잘 작동하는 이유는 history scan 에 최적화돼서야. 제목줄: imperative mood ("Add", "Fix", "Remove" — Git 한테 명령 내리듯이), 50자 이내, 마침표 없음. 빈 줄. 본문: 무엇 과 특히 를 설명, 어떻게 는 안 함 (어떻게는 diff 가 이미 보여줌). 72자에서 줄 바꿈 — 그래야 git log 에서 스크롤 없이 읽혀. footer: issue 참조 ("Closes #142"), co-author, breaking-change marker.

팀 작업용 업그레이드 두 개. Conventional Commits 는 type prefix 를 붙여 (feat:, fix:, docs:, refactor:, test:, chore:) — release tooling 이 changelog 자동 생성 가능. 의미 있는 본문Why, What changed, Risk, How to verify 같은 섹션으로 commit 을 review 가능한 증거로 바꾸고 "이거 뭐야?" Slack DM 의 대부분을 대체해.

실전 workflow: git add -p 로 stage, git commit (-m 없이) 으로 editor 열고, 3분 만에 진짜 메시지 쓰고 저장. 사소한 commit ("Fix typo in README") 엔 -m 괜찮지만 실질적인 commit 엔 적극적으로 해로워 — 한 줄 짜리로 끌어내려. push 전에 진짜 메시지 쓰기를 습관화해. commit 메시지는 미래의 너 자신이 누구보다 많이 읽어.

Code

진짜 commit 메시지·text
Add OAuth2 GitHub login to /auth/callback

Users previously created username+password accounts, which fragmented
identity across this app and their GitHub presence. The OAuth2 flow
unifies sign-in with the same provider where most users already live.

- /auth/github callback handles the code exchange
- Tokens stored encrypted with the AEAD column type
- Logout clears both session and provider tokens
- Profile page now shows the user's GitHub avatar

Risk: token storage migration runs on first deploy; rollback path is
to flip OAUTH_ENABLED=false. Rotation key is in 1Password "oauth-prod".

Closes #142
Refs RFC-2026-04-auth
Conventional Commits prefix·text
feat(auth): add OAuth2 GitHub login
fix(api): handle empty array in /search response
docs(readme): document OAUTH_ENABLED flag
refactor(store): replace ad-hoc cache with TTL map
test(api): add property tests for /search edge cases
chore(deps): bump fastapi to 0.115.0
perf(query): index conversations.created_at
style: re-run prettier across frontend
ci: cache pip in GitHub Actions
revert: "feat(auth): add OAuth2 GitHub login"

# breaking change marker:
feat(api)!: drop /v1/legacy-search endpoint

External links

Exercise

git log --oneline | grep -iE '^[a-f0-9]+ (fix|wip|asdf|update)$' 로 최근 최악의 commit 메시지 하나 찾아. 그 commit 의 메시지가 어땠어야 하는지 초안 잡아: imperative 제목, 빈 줄, why-and-what 본문, 선택적 footer. 아직 history rewrite 할 필요 없음 — 그냥 scratch file 에 더 나은 버전 적고 비교.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.