我试图在git中添加一个别名,以重定向到项目文件夹,打开VS代码并运行本地服务器
我的化名:
[alias]
creative = cd e:/work/vero/creative-app/front-end && code . && npm rune serve当运行git creative响应时,问题是:
expansion of alias 'creative' failed; 'cd' is not a git command发布于 2021-12-23 10:39:17
只需将一个!添加到您的别名中,它将由bash而不是git直接解释。
来自文档:
As you can tell, Git simply replaces the new command with whatever you
alias it for. However, maybe you want to run an external command,
rather than a Git subcommand. In that case, you start the command with
a ! character.https://stackoverflow.com/questions/70460810
复制相似问题