Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
模板化git合并默认消息_Git_Merge_Message_Commit - Fatal编程技术网

模板化git合并默认消息

模板化git合并默认消息,git,merge,message,commit,Git,Merge,Message,Commit,是否可以将默认消息“Merge branch foo into bar”更改为其他内容,因此Merge--no ff将始终显示类似“Adding features xyz”的模板 因此,gitmg将起作用 提交消息模板可以写入文件中 git merge <branch> --no-ff -m "$(cat <msg_template_path>)" git合并--无ff-m“$(cat)” 或 [别名] mg=!git合并$1——无ff-m\“$(cat)\” 因此

是否可以将默认消息
“Merge branch foo into bar”
更改为其他内容,因此
Merge--no ff
将始终显示类似
“Adding features xyz”的模板

因此,
gitmg
将起作用

提交消息模板可以写入文件中

git merge <branch> --no-ff -m "$(cat <msg_template_path>)"
git合并--无ff-m“$(cat)”

[别名]
mg=!git合并$1——无ff-m\“$(cat)\”
因此,
gitmg
将起作用

提交消息模板可以写入文件中

git merge <branch> --no-ff -m "$(cat <msg_template_path>)"
git合并--无ff-m“$(cat)”

[别名]
mg=!git合并$1——无ff-m\“$(cat)\”

我希望有一种更“标准”的方法来做这件事。我希望模板是动态的,所以xyz可以是foo/bar/我在这个合并中实现的任何特性。我希望有一种更“标准”的方法来实现这一点。我希望模板是动态的,所以xyz可以是foo/bar/我在这个合并中实现的任何特性。
git merge <branch> --no-ff -m "$(cat <msg_template_path>)"
[alias]
        mg = !git merge $1 --no-ff -m \"$(cat <msg_template_path>)\"