如何将自定义提交消息添加到此git别名?
如何将自定义提交消息添加到此git别名?,git,Git,git-config——全局别名.a'!git提交-a-m“提交”和git推送“ 不知道怎么用这个!sh要在别名中使用参数吗 尝试使用临时bash函数: git config --global alias.a '!f() { git commit -am "$1" && git push; }; f' # then use it with git a "My message is awesome." 对我也尝试过$1,但显然我不知道我在
git-config——全局别名.a'!git提交-a-m“提交”和git推送“
不知道怎么用这个!sh要在别名中使用参数吗 尝试使用临时bash函数:
git config --global alias.a '!f() { git commit -am "$1" && git push; }; f'
# then use it with
git a "My message is awesome."
对我也尝试过$1,但显然我不知道我在做什么…f(){!git commit-am“$1”&&git push;};f:!git:命令不是found@user5531720很抱歉早期的打字错误,已经编辑过了。