search

Home  >  Q&A  >  body text

View every commit step of the Github project

Background

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

Question

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)

给我你的怀抱给我你的怀抱2848 days ago802

reply all(6)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-02 09:39:19

    git reflog  是可以的,建议你使用 tig 来查看也是不错的

    reply
    0
  • 巴扎黑

    巴扎黑2017-05-02 09:39:19

    You can use git reflog to view your commits

    reply
    0
  • 黄舟

    黄舟2017-05-02 09:39:19

    It seems that the desktop client of git can do this, right?

    reply
    0
  • PHPz

    PHPz2017-05-02 09:39:19

    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

    reply
    0
  • 大家讲道理

    大家讲道理2017-05-02 09:39:19

    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

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:39:19

    Because I don’t like GUI very much, so I used tig

    reply
    0
  • Cancelreply