Information Technology Reference
In-Depth Information
3a619 Fix #13818: Add wrapMap entry for ...
...
Next try the second alias:
$ git stat
It will produce similar results:
Number of revisions: 5192
Number of developers: 190
Number of days: 1246
The working directory:
1.3M
.
The git directory: 16M .git
Number of files in the working dir:
149
Caution
The alias git stat uses
echo
with
-n
parameter to suppress the output of
newline characters. If your system doesn't support
echo -n
, the formatting of the
above results will be different.
How It Works
Git allows you to define aliases for arbitrary commands. The aliases should be stored in
the user's configuration file. The file should be named
.gitconfig
and stored in
your home directory. If you have already executed any commands to configure git with
--global
option, for example,
git config --global user.name
, then the
.gitconfig
file already exists in your home directory. Otherwise, you will have to
create it.
The first of the aliases shown in
Listing 2-14
can be created with:
$ git config --global alias.l "log --oneline
--abbrev-commit --abbrev=4 -25"
The command
git config -global alias.abc "def"
just creates an
entry
abc = def
in the
[alias]
section of your personal
.gitconfing
file.
If you want to find the location of your home directory type: