어서오세요, 코딩과 철학을 포스팅 합니다! [Git History] Decode the Why Behind Every Line of Code How to Read Code History with GitWhen you join a new project, you often find yourself staring at an unfamiliar function wondering, “Why was it written this way?” The code as it exists today rarely explains the reasoning behind those decisions. Fortunately, Git’s commit history tells a deeper story. By following the trail of changes, you can move beyond just reading code to understanding why and .. 2026. 5. 29. [Git] "왜 이렇게 만들었을까"의 답이 여기 있다 Git으로 코드 역사를 읽는 방법새 프로젝트에 합류했을 때, 낯선 함수 앞에서 “왜 이렇게 만들었을까?”라는 의문이 듭니다. 코드의 현재 모습만으로는 그 결정의 배경을 알 수 없습니다. 다행히 Git에 남겨진 커밋 이력을 따라가면, 단순한 코드 읽기를 넘어 그 코드가 존재하는 이유와 맥락까지 파악할 수 있습니다.파일의 진화 과정을 추적하기특정 파일이 어떻게 변해왔는지 보는 것이 코드 이해의 첫걸음입니다. git log --oneline src/payment.py 이 명령은 최신 커밋부터 오래된 순서로 특정 파일의 모든 커밋을 보여줍니다. 각 변경이 언제 이루어졌고, 어떤 메시지로 기록되었는지 한눈에 파악할 수 있습니다.더 깊이 있게 알고 싶다면: git log -p src/payment.py -p 플.. 2026. 5. 29. 이전 1 다음