How do you reset the current branch to a specific commit?
a)
git revert commit-hashb)
git reset commit-hashc)
git delete commit-hashd)
git undo commit-hashAnswer:
b)
git reset commit-hashExplanation:
The git reset commit-hash command resets the current branch to a specific commit. It modifies the commit history by moving the current branch pointer to the specified commit and optionally changing the working directory and index.
For example, running git reset --hard abc123 will reset the branch to commit abc123 and remove any changes made after that commit.
git reset is useful when you need to undo recent changes or return the repository to a previous state.