Recently, I am studying the configuration of Emacs written by a great person. Because it is very complicated, I want to start directly from his first commit and view his commits step by step. I found that I can view the files under each commit on github. list, but the network speed is very slow. If I want to see it locally, how can I view it one commit at a time
1. When I get the hashcode of the first commit directly, git reset --hard a034d
2. Then how do I get to the next commit (that is, the second commit)
You can use
git reflog
to view your commitsIt seems that the desktop client of git can do this, right?
If you want to be simple, you can use git graphical tools, sourcetree, and gitkraken to easily do this. If you want to play with the command line, you can use git show HEAD^ to view the code history of the most recent submission, and git show HEAD^10 to view the code history of the 10th recent submission. For details, you can use git show --help to look at the documentation
You can use git log --graph (or not --graph) to view the IDs of previous operations, and then use reset --hard xxxxxxx to switch to its next submission
Because I don’t like GUI very much, so I used tig