List / search existing aliases

Download git eBook

Example

You can list existing git aliases using --get-regexp:

$ git config --get-regexp '^alias\.'

Searching aliases

To search aliases, add the following to your .gitconfig under [alias]:

aliases = !git config --list | grep ^alias\\. | cut -c 7- | grep -Ei --color \"$1\" "#"

Then you can:

  • git aliases - show ALL aliases
  • git aliases commit - only aliases containing "commit"

Stats

Contributors: 5
2016-09-13
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook