freeParksey
밥세공기
freeParksey
전체 방문자
오늘
어제
  • 분류 전체보기 (150)
    • JAVA (32)
      • 자바스터디 (21)
      • Java in action (6)
      • OOP (1)
      • test (2)
    • 알고리즘 문제 (51)
      • 백준 (49)
    • C (Atmega128) (7)
    • 인공지능 (11)
    • 운영체제 (8)
    • 디자인패턴 (5)
    • 잡다한것 (2)
    • 사용기 (3)
      • 도커 (3)

블로그 메뉴

  • 홈
  • 태그
  • 방명록

공지사항

인기 글

태그

  • Collection
  • 프리코스
  • Thread 동작
  • dto 변환 위치
  • generic
  • 딥러닝
  • Python
  • 동작 파라미터화
  • 백트랙킹
  • 재귀기초
  • 자바
  • 상속
  • 집합과 맵
  • 우아한테크코스
  • java
  • 동적계획법
  • 백트래킹
  • Thread #JVM #자바스터디 #
  • 그리드
  • 3주차
  • 분류
  • Iterator
  • 운영체제
  • 자바스터디
  • 백준
  • 스트림
  • 후기
  • 우테코
  • 알고리즘
  • dto 변환

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
freeParksey

밥세공기

카테고리 없음

Github commit Style guide

2022. 11. 2. 14:26

이전에는 Google Java Style guide에 진행했습니다. 이번에 git에 commit을 하려고 했는데

git commit도 따로 스타일이 있지 않을까 해서 찾아보다. 있어서 작성합니다.


 

Commit 메세지


 

1. 메세지 구조

크게 3가지로 나눌 수 있다. title, body, footer

type: Subject

body

footer

 

2. The Type

  • feat: 새로운 기능 추가시 사용
  • fix: 기능 버그
  • docs: 문서 추가 및 변경했을 때
  • style: UI를 추가/변경했을 때
  • refactor: 코드 자체를 리팩토링 했을때
  • test: 테스트 코드를 별도로 추가하거나 변경, 테스트 코드를 리팩토링했을 때 
  • chore: 빌드 작업이나 패캐지 관리자 구성 등 업데이트, 프로덕션 코드 변경 없을 때

 

3. The Subject

  • 제목은 50자 이내
  • 명령형 어조 사용하여 커밋, 수행하는 작업을 설명가능해야 한다.
  • 마지막에 마침표(.)를 찍지 않는다.

 

4. The Body

  • 하나의 선택사항
  • 약간의 설명이 필요할 경우에만 사용
  • Body를 사용하여 내용과 이유를 설명한다.

 

5. The Footer

  • 하나의 선택사항
  • Issue tracker ID를 참조하는데 사용한다.

 

 

예제


feat: Summarize changes in around 50 characters or less

More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.

Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.

Further paragraphs come after blank lines.

 - Bullet points are okay, too

 - Typically a hyphen or asterisk is used for the bullet, preceded
   by a single space, with blank lines in between, but conventions
   vary here

If you use an issue tracker, put references to them at the bottom,
like this:

Resolves: #123
See also: #456, #789

 

 

참고문헌


Udacity Nanodegree Style Guide

 

Udacity Nanodegree Style Guide

Introduction This style guide acts as the official guide to follow in your projects. Udacity evaluators will use this guide to grade your projects. There are many opinions on the "ideal" style in the world of development. Therefore, in order to reduce the

udacity.github.io

 

    freeParksey
    freeParksey
    Github: https://github.com/parksey

    티스토리툴바