— git, convention — 1 min read
아래 참고사이트를 요약하였음.
위 가이드를 따르면 아래 명령어를 이용할 때 보기 편리함. + git에서 추천함
1git log --oneline2git shortlog
.
금지명령조
git Built-in Convention을 따른다.
Good
1(If applied, this commit will) Refactor subsystem X for readability
Bad
1(If applied, this commit will) Fixed bug with Y
어떻게
보다 무엇을
, 왜
에 맞춰 작성좋은 예
1commit eb0b56b19017ab5c16c745e6da39c53126924ed62Author: Pieter Wuille \<[email protected]\>3Date: Fri Aug 1 22:57:55 2014 +020045 Simplify serialize.h's exception handling67 Remove the 'state' and 'exceptmask' from serialize.h's stream8 implementations, as well as related methods.910 As exceptmask always included 'failbit', and setstate was always11 called with bits = failbit, all it did was immediately raise an12 exception. Get rid of those variables, and replace the setstate13 with direct exception throwing (which also removes some dead14 code).1516 As a result, good() is never reached after a failure (there are17 only 2 calls, one of which is in tests), and can just be replaced18 by !eof().1920 fail(), clear(n) and exceptions() are just never called. Delete21 them.
아래 문법으로 커밋 메세지를 남기면 default branch(master)에 푸시 될 때 이슈 닫힘.
1키워드 #이슈번호
close계열 : 일반 개발 이슈 fix계열 : 버그 픽스, 핫 픽스 이슈 resolve : 문의, 요청 사항에 대응한 이슈
1# 제목에 이슈 한 개 닫기를 적용한 사례2Close #31 - refactoring wrap-up34* This is wrap-up of refactoring main code.5* main.c6 * removed old comments7 * fixed rest indentations8 * method extraction at line no. 3591011# 본문에 이슈 여러 개 닫기를 적용한 사례12Update policy 16/04/021314* This closes #128 - cab policy, closes #129 - new hostname, and fixes #78 - bug on logging.15* cablist.txt: changed ACL due to policy update delivered via email on 16/04/02, @mr.parkyou16* hostname.properties: cab hostname is updated17* BeautifulDeveloper.java: logging problem on line no. 78 is fixed. The `if` statement is never happening. This deletes the `if` block.