[英]Add new command on Windows Git Bash
I would like to add new command on my Git Bash (just now i am under Windows OS).我想在我的 Git Bash 上添加新命令(刚才我在 Windows 操作系统下)。 I tryed to look on Web different solutions but I did not find anything.
我试图在 Web 上查看不同的解决方案,但没有找到任何东西。 The command that i like to add is:
我想添加的命令是:
commitall -> git add --all && git commit -m "$*"
commitall -> git add --all && git commit -m "$*"
There is a way to add this command on Windows Git Bash?有没有办法在 Windows Git Bash 上添加这个命令?
Thanks谢谢
Use Git aliases , like so:使用Git aliases ,如下所示:
git config --global alias.commitall '!git add --all && git commit -m'
There's no need to use $*
because all the arguments you specify will simply be appended to the line above, ie if you run:没有必要使用
$*
因为您指定的所有参数都将简单地附加到上面的行,即如果您运行:
git comitall "a message"
…the following will be executed: …将执行以下操作:
git add --all && git commit -m "a message"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.