Last Updated: February 25, 2016
·
941
· qblake

Git Aliases. What do they mean? Updated.

UPD. All you need is git help <alias>. Thanks to @laurentpsychedelic

Suppose that you have installed some git aliases in your system like discribed here. You use whem for a while. And once you're thinking: Ohh no! I forgot! What do they mean?

To refresh in mind you can use this command:

git config --get alias.name

For example:

git config --get alias.graph

You will get command

log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'

To see all aliases you have to use

git config --get-regexp alias*

You get:

alias.b branch -v
alias.r remote -v
alias.t tag -l
...

Lets go deeper. Add this alias to your ~/.gitconfig file in alias section

aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'

Now you can use command git aliases and get result:

b = branch -v
r = remote -v
t = tag -l
...

Further reading

2 Responses
Add your response

To get the meaning of a single alias 'git help <alias>' does also the job.
Example:

>> git help br

'git br' is aliased to 'branch'

over 1 year ago ·

Wow! It's so simple! Thanks!

over 1 year ago ·