38
Commit Log in English Masayuki Ataka

Commit Log in English

  • Upload
    -

  • View
    85

  • Download
    2

Embed Size (px)

Citation preview

Commit Log in EnglishMasayuki Ataka

Agenda

Commit Log in Git

How to Write a Commit Log in English

Appendix

目的1. 英語の Commit Log や Pull-Request,

Comment を読む

2. 英語で Commit Log や Pull-Request,

Comment を書く

3. プロジェクトに英語を採用する

Commit Log in Git

Git Commit Log FormatShort (50 chars or less) summary of changes

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 an email 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); some git tools can get confused if you run the two together.

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

Git Commit Log FormatSummary - 概要 (最大 50 文字)

Detailed Explanatory Text - 説明文 (72 文字で改行) 必要なら詳しい説明を書きます。 概要と説明文の間に空行を挟みます。 「概要」はメールのタイトル、 「説明文」はメールの本文となることがあります。

段落の区切りは空行を使います。

- Bullet points も良いでしょう

- 通常 bullet にはハイフン (-) もしくはアスタリスク (*) が使われます。 スペースを前に一つ置き、空行で区切ります。 この慣習は絶対ではありません。

Summary は

よく使われます

Summary - git log -—oneline

$ git log --oneline | head -5

99da995 New command chatwork-send-stamp 2b56b08 Delete trailing white spaces of code tag ea46c04 Rewrite chatwork-insert-tag-code with skelton 3922703 Add new variable chatwork-room-history f4cf88d Add new command chatwork-insert-tag-code

Summary - Github

Summary - SourceTree

git rebase -i HEAD~10

Summary は

とっても重要です

How to Write a Commit Log in English

Summary のポイント不定詞で始める

ピリオドは打たない

大文字で始める

小文字で始める場合もあり

統一するのが重要

50 文字以内

不定詞で始める

fixed bug with Y changing behavior of X more fixes for broken stuff sweet new API methods

不定詞で始める

refactor subsystem X for readability update getting started documentation remove deprecated methods release version 1.0.0 merge pull request #123 from user/branch

どう考えるか

If applied, this commit will を

前につけてみる

文章として読めるIf applied, this commit will refactor subsystem X for readability If applied, this commit will update getting started documentation If applied, this commit will remove deprecated methods If applied, this commit will release version 1.0.0 If applied, this commit will merge pull request #123 from user/branch

文章の体をなしていないIf applied, this commit will fixed bug with Y If applied, this commit will changing behavior of X If applied, this commit will more fixes for broken stuff If applied, this commit will sweet new API methods

ピリオドは打たない

remove deprecated methods

remove deprecated methods.

大文字で始める

Refactor subsystem X for readability Update getting started documentation Remove deprecated methods Release version 1.0.0 Merge pull request #123 from user/branch

小文字で始めない 許されることもある

refactor subsystem X for readability update getting started documentation remove deprecated methods release version 1.0.0 merge pull request #123 from user/branch

混ぜるな危険!

Refactor subsystem X for readability update getting started documentation Remove deprecated methods release version 1.0.0 Merge pull request #123 from user/branch

簡潔に書く - それ説明文Re-adding ConfigurationPostProcessorTest

after its brief removal in r814.

Fix failing CompositePropertySourceTests

情報がない!

polishing

Polish mockito usage

References

Git Reference: commit

How to Write a Git Commit Message

AngularJS: Commit Message Format

GNU Octave: Commit Message Guideline

Appendix: 英文コメントを読むために

A which … vs A, which …He has a cat that lives 5 years.

He has a cat, that lives 5 years.

彼は5歳の猫を飼っている

(2歳の猫も飼っているかもしれない)

彼は猫を飼っていて、猫は5歳である

(飼っているのは一頭だけ)

A, which …

You can activate the first menu-bar menu by typing F10, which invokes `menu-bar-open'.

F10 キーをタイプすることで

メニューバーの最初のメニューを起動できます。 F10 キーは menu-bar-open 関数を呼び出します。

fix bug - that vs to

Fix bug that app crashes after finishing video chat

Fix bug to stop some of the recent freezes

that 節の内容を修正した

最近のフリーズを止めるためにバグを修正した

fix bug - that vs to

Fix bug that app crashes after finishing video chat

Fix bug to stop some of the recent freezes

that 節の内容を修正した

バグを修正した。最近のフリーズを止めた

to の後の文章は修正した結果

iff : if and only if

I use an umbrella if it rains.

もし雨が降っていたら、傘をさします

雪が降っていたら?

傘をさします嘘は言ってない: 十分条件

iff : if and only if

I use an umbrella only if it rains.

傘をさすのは、雨が降っていた場合だけです

雨が降ってて、傘をささないこともあります

嘘は言ってない: 必要条件

小雨の時とかね

iff : if and only if

I use an umbrella if and only if it rains.

傘をさすのは、雨が降っていた場合だけです

もし雨が降っていたら、傘をさします

雨が降っていたら、必ず傘をさします 必要十分条件

iff in AUCTeX

(defun TeX-near-bobp () "Return t iff there's nothing but whitespace between (bob) and (point)." (save-excursion (skip-chars-backward " \t\n") (bobp)))

bob = beginning of buffer

Fin.

God grant me the serenity to accept the things I cannot change,

courage to change the things I can, and wisdom always to tell the difference.

— マーニーの祈り

If A then B ⇄ Only if B then A

I use an umbrella, only if it rains

→ If I use an umbrella, it rains

DHMO Dihydrogen Monooxide

A human kills the other, only if he has taken HDMO in latest 7 days.

If A human kills the other, he has taken HDMO in latest 7 days.