How do you check out a specific commit in Git?
a)
git checkout commit-hashb)
git revert commit-hashc)
git checkout branch-named)
git pull commit-hashAnswer:
a)
git checkout commit-hashExplanation:
The git checkout commit-hash command checks out a specific commit by its hash. This places your repository in a detached HEAD state, allowing you to view or work with the project at the state of that commit.
For example, running git checkout abc123 will check out the commit with hash abc123.
Be aware that if you make new commits in this state, they won’t be attached to any branch unless you create a new one.