Information Technology Reference
In-Depth Information
The alias syntax
The syntax to define a git alias in a .gitconfig file is either:
alias = command
or
alias = !command
The first version—the one without exclamation mark—applies to git subcommands.
Alias:
abc = def
defines the command that can be named as:
$ git abc
When executed, git abc will produce the same effect as:
$ git def
Thus we can define alias:
l = log --pretty=oneline
that when called:
$ git l
will be expanded to:
$ git log --pretty=oneline
The second syntax for aliases—the one with exclamation mark—applies to arbitrary
shell commands. The alias:
list-files = !ls
Search WWH ::




Custom Search