Quickly flip through Git commit history
I want to learn a new project, I need to constantly switch in the project’s commit history so that I can view the code. First, I execute git switch --detach commit-hash
to bring the project back to the first commit, but when I want to continue viewing the second commit, I execute git log
, I find that there is only one commit in the commit history, and I have no way to switch. Is there a quick way to easily switch to the previous commit and the next commit? Please help me.