List all Git aliases
Setting up Git aliases can be a great way to save time and make your workflow more efficient. However, if you've set up a lot of aliases, it can be hard to remember what they all are. Luckily, you can easily list them using the git config
command.
In order to print all your aliases, you'll first have to use git config -l
to list all variables set in the configuration file. In order to filter the output and only keep aliases, you can pipe the output (|
) to grep alias
. Finally, you can use sed 's/^alias\.//g'
to remove the alias.
part from each alias.
# Syntax: git config -l | grep alias | sed 's/^alias\.//g' # Examples git config -l | grep alias | sed 's/^alias\.//g' # st=status # co=checkout # rb=rebase