List All Git Aliases
As a developer, you may want to list all the Git aliases that have been set up on your system. This can be useful for several reasons, such as:
- Checking which aliases are available
- Finding out what commands an alias is mapped to
- Removing or modifying existing aliases
Tasks
Let's say you have a Git repository named git-playground
located at https://github.com/labex-labs/git-playground
.
You have set up the following aliases:
alias.st=status
alias.co=checkout
alias.rb=rebase
- Navigate to this repository on your local machine.
- Use the
sed
command during the listing of all of Git's aliases.
Running the command will output:
st=status
co=checkout
rb=rebase