2016-06-30 3 views

答えて

0
git merge <branch> --no-ff -m "Adding features xyz" 

エイリアスはgit config --global -e、それを短くすると、次の別名を貼り付けることができます。

[alias] 
     mg = !git merge $1 --no-ff -m \"Adding feature xyz\" 

従ってgit mg <branch>が機能します。

コミットメッセージテンプレートは、ファイルに書き込むことができます。

git merge <branch> --no-ff -m "$(cat <msg_template_path>)" 

または

[alias] 
     mg = !git merge $1 --no-ff -m \"$(cat <msg_template_path>)\" 
+0

私はこれを行うには、より "標準的な" 方法があることを望みました。テンプレートを動的にしたいので、xyzはfoo/bar /このマージで実装したどのような機能でもかまいません。 – uloco

関連する問題