What command shows the commit message, author, and date for a specific commit?
Posted by LeoRobs
Last Updated: June 10, 2024
To show the commit message, author, and date for a specific commit in Git, you can use the following command:
git show <commit-hash>
Replace <commit-hash> with the actual hash of the commit you are interested in. This command outputs the commit details, including the commit message, author, date, and the changes made in that commit. If you only want to see the commit message, author, and date without the diff, you can use:
git show --summary <commit-hash>
Or, to see only the commit information without the detailed changes, you can format it using:
git log -1 --format=fuller <commit-hash>
In this case, -1 limits the output to one commit, and --format=fuller gives detailed information including the author and committer details as well as the date.