WebMasterCampus
WEB DEVELOPER Resources

How to Get Git Last Commit Date

How to Get Git Last Commit Date


git log -1 --format=%cd

Use the following git command to get the git last commit date. Result will return with Day of the week, Month Name, date, timing with year and GMT.

    git log -1 --format=%cd

    Result: Sat Jul 29 12:25:03 2023 +0500

git log -1 --format=%ai

Use the following git command to get the git last commit date. Result will return only date, timing with year and GMT.

    git log -1 --format=%ai

    Result: 29 12:25:03 2023 +0500

Git Log Command

Use it to check master branch complete log history. Press q to quit.

 git log master

To read more about git log command visit Git Log Command

Created with love and passion.