Git - Log Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

Limit number of commits by . E.g. git log -5 will limit to 5 commits.

A

git log -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Condense each commit to a single line.

A

git log —oneline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Display the full diff of each commit.

A

git log -p

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Include which files were altered and the relative number of lines that were added or deleted from each of them.

A

git log —stat

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Search for commits by a particular author.

A

git log —author=“”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The —decorate flag makes git log display all of the references (e.g., branches, tags, etc that point to each commit.
This can be combined with other configuration options. For e.g. running git log —oneline —decorate

A

git log —oneline —decorate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

The git shortlog command is a special version of git log intended for creating release announcements. It groups each commit by author and displays the first line of each commit message. This is an easy way to see who has been working on what.

A

git shortlog

  • n : sort output according to the number of commits per author instead of author alphabetic order.
  • s : suppress commit description and provide a commit count summary only.
  • e : show the email address of each author.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Git log command provides an overview of entire repo commits but there is a command for directory specific commits

A

git log

e.g. git log /stylesheets (this command will provide the commits specific to this directory)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly