I understand how to create aliases in PowerShell for cmdlets fine, but I want to create an alias in PowerShell for things like git status as just gs, and git pull origin master as gpm. Can anyone point me in the right direction?
I understand how to create aliases in PowerShell for cmdlets fine, but I want
Share
You will have to create a function first, that has your command in it. Then create an alias to that function.
You might also be interested in the OS project called posh-git that aims to provide a powershell environment for git commands. Wraps git commands with PS type functions and also provides a new prompt that shows the status and branch in your prompt.
EDIT: Forgot to add how to find out how to do this using Powershell.
This will show you examples (the last one applies here) of how to use set-alias to create aliases to commands with paramaters, pipelines, etc.