Information Technology Reference
In-Depth Information
$ echo abc
$ ls
In a similar way, the alias:
info = "!funInfo(){ git --version; git log
--pretty=oneline -3; }; funInfo"
can be called:
$ git info
It will produce the same output as two commands:
$ git --version
$ git log --pretty=oneline -3
Because of the semicolons, the alias using the shell function needs to be enclosed in
quotes.
The aliases from Listing 2-14
The first alias presented at Listing 2-14 is:
l = log --oneline --abbrev-commit --abbrev=4 -25
It doesn't use the exclamation mark; therefore, it refers to a git subcommand. When
called:
$ git l
it will be expanded to:
$ git log --pretty=oneline --abbrev-commit --abbrev=4 -25
Git allows you to pass additional parameters to aliases. Therefore, if you want to
produce a simplified list of revisions by John Doe, call the alias with the --author
parameter:
Search WWH ::




Custom Search