Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

Git の Conventional Commits について整理する

0
Posted at

はじめに

Conventional Commits についての備忘録です。

Conventional Commits とは

公式曰く

人間と機械が読みやすく、意味のあるコミットメッセージにするための仕様

とのことです。

平たく言うと、コミットメッセージをみんなで分かりやすく書くための共通ルールです。

記述ルール

以下のフォーマットで記述されます。

フォーマット
<type>[optional scope]: <description>
実例 1
docs: 仕様変更に合わせて README 更新。
実例 2
fix(login): パスワードが空文字の場合、ログインできないように修正。

Type について

代表的な Type は以下の通りです。

Type 意味
feat 新機能の追加
fix バグの修正
docs ドキュメントの変更
style フォーマット・整形
refactor リファクタリング
test テストの追加・修正
chore 雑務・設定・依存更新

BREAKING CHANGE について

破壊的な変更には BREAKING CHANGE というキーワードを付与します。

実例 1
feat(api): エンドポイントの変更。

BREAKING CHANGE: パス構造が変更されました。

! による代替も可能です。こちらの方が主流かなと思います。

実例 1
feat(api)!: エンドポイントの変更。

おわりに

みんながちゃんとルールを守れば、変更内容が追跡しやすくなります。

0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?