Help us understand the problem. What is going on with this article?


More than 3 years have passed since last update.




$ pwd
=> /path/to/Sample
$ git init
$ git config commit.template .gitmessage.txt
$ vim .gitmessage.txt
subject line

what happened

[ticket: X]

これだけです。 git config コマンドの結果は、 path/to/Sample/.git/config に書かれます。

あとは、 git commit を叩いてみてください。以下のようにエディタが開くようになります。

subject line

what happened

[ticket: X]
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
# modified:   lib/test.rb
".git/COMMIT_EDITMSG" 14L, 297C
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away