我希望有一个 git 别名来提交消息并在提交消息中自动填充分支名称。输出示例:git commit -m "[EX-1234] This is the commit message"
我正在寻找一种仅在终端中输入的方法:git cm this is the commit message它将执行输出示例。
我尝试过的事情
cm = "git commit -m \'[$(current_branch)] ${1}\'"
cm = "!f() { \
git commit -m '[$(current_branch)] $1'; \
}; f"
cm = '!sh -c '\''git commit --m "${1}"'\'' -'
上面的例子不起作用