Files
30-seconds-of-code/snippets/list-aliases.md
Angelos Chalaris fb4b6fbc8e Update covers
2023-02-16 22:24:37 +02:00

633 B

title, tags, cover, firstSeen, lastUpdated
title tags cover firstSeen lastUpdated
List all git aliases configuration book-chair 2021-04-04T21:25:22+03:00 2021-04-13T21:10:59+03:00

Prints a list of all git aliases.

  • Use git config -l to list all variables set in the configuration file.
  • Use the pipe operator (|) to pipe the output and grep alias to only keep aliases.
  • Use the pipe operator (|) to pipe the output and sed 's/^alias\.//g' to remove the alias. part from each alias.
git config -l | grep alias | sed 's/^alias\.//g'
git config -l | grep alias | sed 's/^alias\.//g'
# st=status
# co=checkout
# rb=rebase