Information Technology Reference
In-Depth Information
--author="John Doe"
—commits by a given author
Hint
The dates passed to
--since
and
--until
parameters can be set in
yyyy-
mm-dd
format or less formally as
--since="1 week ago"
,
--since="Two
months ago"
,
--until="5 days ago"
,
--until="7 hours ago"
,
--
until="yesterday"
. To avoid typing quotation marks, you can also use dots for
spaces, like in
--since=1.week.ago
,
--since=Two.months.ago
,
--un-
til=5.days.ago
.
2-9. Analyzing a repository with git log
and shortlog commands
Problem
You want answers to the following questions for the jQuery project:
• How many revisions does the repository contain?
• How many developers contributed to the project?
• How many days did they work on the project?
• How much space is used by the working directory?
• How much space is used by the git directory?
• How many files are in the working directory?
Solution
Enter the directory
git-recipes/02-01/jquery/
:
$ cd git-recipes/02-01/jquery
To answer the questions execute the commands shown in
Listings 2-8
to
2-13
.