# How to create an alias for multiple commands in ConEmu?

In Git-Bash I have an alias that executes two commands; update the list of branches for a git repository, then print them:

alias glb='git remote update origin --prune && git branch -a' 

How do I do this in ConEmu? Specifically, Cmder for Windows.

Since ConEmu doesn't use quotes with alias, I have to type alias glb=git remote update origin --prune && git branch -a which is interpreted as two separate commands, first alias glb=git remote update origin --prune and then git branch -a.

• The answer depends on shell you are using and exact place where you are trying to configure alias Oct 13 '15 at 22:53
• It's Cmder for Windows. I updated the question to clarify this. Oct 14 '15 at 11:21
• I've asked about shell too! cmder is a terminal. Oct 14 '15 at 15:35
• Actually, if you are using cmd.exe, you may just use double quotes instead of single ones. Oct 14 '15 at 15:38

$t So your example would be: alias glb=git remote update origin --prune$t git branch -a
• You can get around having to restart CMDer simply by reloading the aliases via alias /reload. If for some reason that doesn't work, the full command is %SystemRoot%\system32\doskey /macrofile=Path\To\Your\user-aliases.cmd Dec 3 '17 at 15:38
Open user-aliases.cmd file under \path\to\cmder\config to add the alias directly, then restart the cmder.  glb=git remote update origin --prune \$t git branch -a