Sometimes, you committed some changes in git locally. Now you missed that where you have committed the right changes or not. You That specific detail that you wanted to change, whether you have correcty done it or not.
You also don't want to do reset the commit because it might take time and you just want to verify the changes because while committing a change, you were in hurry.
If you the commit hash, you can check file changes easily.
Follow these steps:
Find the commit hash:
Use this commond to find the commit hashgit log
Now check file changes:
git diffcommand to check file changesgit diff commithash^!
As you can see,
^!is appended to the commit hash.
e.g.git diff 4eb3fcc0ca8e7e9dbacf686222b853531217c1b5^!
Now you check file changes easily.