FreeKB - Viewing the log of commits in Git
Viewing the log of commits in Git

Home > Search


If you are not familiar with CVS, check out our getting started article. These examples are based on Linux. Let's say you've made a few commits to foo.txt. The git log command can be used to view the history of commits.

git log

 

The log will display entries like this.

commit abcdefghijklmnopqrstuvwxyz1234567890
Author: John Doe <john.doe@example.com>
Date:   Tue May 30 20:26:36 2017 -0500

  First commitment

 

Sometimes, it's a tad easier to work witht the --oneline flag.

git log --oneline

 

Which will produce output like this:

afba75a your commit message

 

Or even better, you can fine tune the output.

git log --pretty=format:%h,%cn,%cd,%s --date=local

 

Which will produce output like this:

afba75a,John Doe,Fri Jun 14 07:00:24 2019,your commit message

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 95664 in the box below so that we can be sure you are a human.




Comments