Information Technology Reference
In-Depth Information
$ git l --author="John Doe"
You can pass any other parameters in the same manner.
The next alias is:
days = "!days() {
git log --pretty=format:%cd --date=short | uniq;
}; days"
Because of the exclamation mark it is expanded to a shell command. The command
defines and calls the function named days() . When you type:
$ git days
it will eventually execute:
$ git log --pretty=format:%cd --date=short | uniq
The last alias is a shell function that calls a number of other commands.
stat = "!stat() {
echo -n Number of revisions:;
git log --oneline | wc -l;
echo -n Number of developers:;
git shortlog -s | wc -l;
echo -n Number of days:;
git days | wc -l;
echo -n The working directory:;
du -h -s --exclude=.git;
echo -n The git directory:;
du -h -s .git;
echo -n Number of files in the working dir:;
git ls-files | wc -l;
}; stat"
Notice, that we produce the number of days with the subalias:
$ git days | wc -l
Search WWH ::




Custom Search