Make delicious recipes!

Git log (Viewing File History)


Git has a powerful mechanism and command set to view history of a file.
Main command to be used is git log <filename>

This command has several useful options:
  1. git log --graph

  2. git log --stat

  3. git log -p (shows the diffs along with the history of commits)

  4. git log -2 (limits the number of historical entries to 2)

  5. git log --since=3.weeks

  6. git log --after="3 minutes ago" (--until, --before can also be used)

  7. git log --author <author>

  8. git log --committer <committer>

  9. git log --grep <pattern to grep in commit messages>

  10. git log --pretty=oneline (shows the checksum of each commit along with the commit message)






Like us on Facebook to remain in touch
with the latest in technology and tutorials!


Got a thought to share or found a
bug in the code?
We'd love to hear from you:

Name:
Email: (Your email is not shared with anybody)
Comment:

Facebook comments:

Site Owner: Sachin Goyal