-
Notifications
You must be signed in to change notification settings - Fork 1
/
xavb.txt
29 lines (29 loc) · 1.36 KB
/
xavb.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Formatting Log Output
The default format takes up a lot of space though,
so there are ways to limit and format this output differently.
—pretty is a useful option for formatting the output in different ways.
For example, we can list the commit SHA-1s and the first line of the message with —pretty=oneline:
With —pretty, you can choose between oneline,
short,
medium,
full,
fuller,
email,
raw
and format:(string),
where (string) is a format you specify with variables
(ex: —format:”%an added %h on %ar” will give you a bunch of lines like “Scott Chacon added f1cc9df 4 days ago”).
Filtering Log Output
There are also a number of options for filtering the log output.
You can specify the maximum number of commits you want to see with -n,
you can limit the range of dates you want to see commits for with —since and —until,
you can filter it on the author or committer,
text in the commit message and more.
Here is an example showing at most 30 commits between yesterday and a month ago by me:
• git log (http://www.kernel.org/pub/software/scm/git/docs/git-log.html)
git log options screencast
The next screencast is on git log,
which demonstrates most of the major features and options to the git log command.
It includes showing the stat, short-stat and name-stat options,
the —pretty options, the since and until limiters,
the path limiter and author field searching.