List Git aliases


How do I print a list of my git aliases, i.e., something analogous to the bash alias command?


Just adding this because it’s so simple and I didn’t see it in previous answers (sorry if I missed it).

git help -a

You’ll have to scroll to the bottom (use > as ma11hew28 pointed out) to see the list, e.g.:

Command aliases
   restore-deleted      !git restore $(git ls-files -d)

If you forget even this switch, a simple git help will help you remember:

‘git help -a’ and ‘git help -g’ list available subcommands and some
concept guides. See ‘git help ‘ or ‘git help ‘ to
read about a specific subcommand or concept.

Answered By – Nagev

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published