git: Show Details of a Previous Commit, git log Details

Below is information regarding the use of the git log command. There are numerous git log options described below including showing a single revision, a certain number of revisions, revisions since a certain date, and showing more details about revisions. The git log command can be useful to see specifically what has been checked in to the repository just for a revision history or to verify that the proper changes have been made.

Show Previous Commits:

git log

This will show a listing of previous revisions for the current branch.

Show Previous Commits +Details:

git log -p

This will show a listing of the previous revisions including what has been modified in each revision.

Show The Latest Commit:

git log -1

This will show the latest revision only.

Show The Latest Commit Plus Details:

git log -p -1

This will show the latest revision including the details of the revision.

Show the 5 Latest Commits:

git log -5

This will s how the latest fice commits.

Show Commits SinceĀ a Certain Date:

git log --since="Tue May 10 13:34:26 2009 -0500"

This will show any revisions that have been commited since May 10th at 1:34 PM. You can also use the below to show commits since a certain date. You could use days, weeks, etc. The below would show all the commits since yesterday.

git log --since="1 day ago"

Show Commits Up To a Certain Date:

git log --until="Tue May 09 17:34:26 2009 -0500"

This will show revisions up to May 9th at 5:34 PM starting with the revision closest to that date.

Show Commits Up To a Certain Date:

git log --name-only -1

This will show the latest revision with the names of the files that were added or modified.

Show Details About a Specific Commit:
To show details about one specific commit use the “git show” command as shown below.

git show 44f1f96e23ecb835e4442bf464861231b2d96d7e

For more information about git check out the below.


List Price: $34.95 USD
New From: $11.03 USD In Stock
Used from: $0.32 USD In Stock

Share