LoginSignup
12
8

More than 5 years have passed since last update.

git で複数行のコミットメッセージをコマンドラインから入れる

Posted at

-m オプションを二つつける

$ git commit -m "subject" -m "more desciption"
[develop 886be68] subject
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 new_file.txt
$

結果

$ git show
commit 886be681f57b1e83f885705cb9acc297e396492a
Author: negito6 <negito6@example.com>
Date:   Thu May 19 21:23:16 2016 +0900

    subject

    more desciption

diff --git a/new_file.txt b/new_file.txt
new file mode 100644
index 0000000..e69de29
$

hub コマンドではダメだった。

ヒアドキュメント使う

こちらの記事に書いてありました http://qiita.com/sutonea/items/0eeb4677691fdd8c3555

12
8
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
12
8