Viewing Individual Commits - hash

Hi,

I’m currently doing the Git Remotes mission. I was under the impression that the long ID code we get for each commit (for example 6a95e94ea10caa28013b767510d4bc59369d83fa) is the hash of the commit. However, the answer for the 5. Viewing Individual Commits exercise is:

cd /home/dq/chatbot
HASH=git rev-parse HEAD
git show $HASH -q

Could you please explain how we got to that?

Thanks in advance,
Ivelina

EDIT: I just got to 9. Referring to the Most Recent Commit where this is actually explained. Maybe the mission needs to be rearranged.

1 Like