What is the command to view the commit history in Git?
a)
git historyb)
git logc)
git commitd)
git showAnswer:
b)
git logExplanation:
The git log command displays the commit history of the repository. It shows details like the commit hash, author, date, and the commit message. By default, it lists all the commits in reverse chronological order.
You can use options like git log --oneline to view a condensed version or git log -p to show the differences introduced by each commit.
Understanding the commit history is important for tracking changes, debugging issues, and reviewing the project’s development over time.