LoginSignup
0
0

More than 1 year has passed since last update.

gitのコミットメッセージにブランチ名を自動で含める方法

Last updated at Posted at 2020-02-25
$ vi .git/hooks/prepare-commit-msg
prepare-commit-msg
#!/bin/sh

mv $1 $1.tmp
echo "`cat $1.tmp` `git rev-parse --abbrev-ref HEAD`" > $1

参考文献

この記事は以下の情報を参考にして執筆しました。

0
0
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
0
0