![Forrest logo](/images/logo.png)
gh-alias:tldr:6780d
The gh alias
command is used to manage and configure custom command aliases in GitHub CLI (gh).
Aliases are shortcuts or alternative names for frequently used GitHub CLI commands. They help to simplify and speed up the usage of CLI commands by allowing users to create their own custom commands or aliases.
When you run gh alias
without any additional parameters, it lists all the existing aliases that you have set up. The command is useful for checking the current aliases you have defined.
Some additional options that can be used with gh alias
are:
-
gh alias set <name> <command>
: This creates a new alias<name>
for the specified<command>
. For example,gh alias set ll "pr list --limit 5"
would create an aliasll
for the commandpr list --limit 5
. Now, whenever you rungh ll
, it will executepr list --limit 5
. -
gh alias delete <name>
: This removes the specified alias<name>
from your configuration. For instance,gh alias delete ll
will remove thell
alias we created earlier. -
gh alias reset
: This resets all the custom aliases to their default values.
The gh alias
command allows you to set up and manage your own customized command shortcuts, making it easier and more efficient to interact with GitHub CLI.