[英]Alias error: using cd command with Git bash
我正在嘗試向 git 添加別名以重定向到項目文件夾,打開 VS Code 並運行本地服務器
我的別名:
[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
只需在前面加上一個!
到您的別名,它將由 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.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.