본문 바로가기
C.W.K.
Stream
Lesson 04 of 05 · published

git commit: 미래 탐색용 메시지

~20 min · commit, messages

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

commit message는 미래에 이력을 찾는 표지판이야

6개월 뒤 새벽 2시에 뭔가 망가졌다고 해보자. git log -p -- offending-file을 실행하고 그 파일을 건드린 commit의 message를 하나씩 읽게 될 거야. 원인을 5분 만에 찾을지 두 시간을 헤맬지는 과거의 네가 남긴 말에 크게 달려 있어. "fix stuff", "wip", "asdf", "save"는 message가 아니라 기록을 포기한 흔적이야.

널리 쓰는 형식은 이력을 훑어보기에 알맞아서 살아남았어. 제목: "Add", "Fix", "Remove"처럼 Git에 명령하듯 쓰고, 50자 안팎으로 마침표 없이 끝내. 빈 줄. 본문: 무엇을, 특히 바꿨는지 설명해. 어떻게 바꿨는지는 diff가 이미 보여줘. 72자쯤에서 줄을 바꾸면 git log에서도 편하게 읽혀. footer: issue 참조("Closes #142"), co-author, breaking-change marker를 둬.

팀 작업에는 두 가지를 더할 수 있어. Conventional Commitsfeat:, fix:, docs:, refactor:, test:, chore: 같은 type prefix를 붙여 release 도구가 changelog를 자동 생성하게 해. 의미 있는 본문Why, What changed, Risk, How to verify 같은 구획으로 commit을 검토할 수 있는 증거로 바꿔. "이거 뭐야?"라는 Slack DM도 크게 줄어들지.

실전에서는 git add -p로 stage하고 git commit을 실행해 편집기에서 제대로 된 message를 써. "Fix typo in README" 같은 사소한 commit에는 -m도 괜찮지만, 실질적인 변경을 한 줄짜리 설명으로 몰아넣는 습관은 해로워. push 전에 이유가 남는 message를 쓰는 습관을 들여. 미래에 가장 많이 읽을 사람은 바로 너야.

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 message 하나를 찾아. 그 message가 어땠어야 하는지 다시 써봐. 명령형 제목, 빈 줄, why-and-what 본문, 필요하다면 footer까지 갖춰. 아직 이력을 다시 쓸 필요는 없어. 연습용 파일에 더 나은 version을 적고 비교해.

Progress

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

댓글 0

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

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