pie3636 pie3636 -4 years ago 99
Git Question

Git - Pull code from the beginning, commit after commit

I have forked a project on GitHub, and, in order to understand how it works (to later contribute to it), I'd like to go back in time to the very first commit that was made, and then pull them one after the other, simply browsing the repo at each step, as well as seeing the diff with the previous commit.

So basically, I need to know how to do three things:


  • Go back to the initial state of the repo

  • Pull one commit (I don't need to edit the code, just view it)

  • See the diff between this commit and the previous one



I'm assuming that I could do something like
git diff HEAD~1
for the latter. However, I have no idea how to do the two other ones, especially the very first one.

Answer Source

Any Git GUI -- gitk, GitUp, GitKraken, GitHub Desktop, etc. -- should allow you to do what you want. Select the mainline branch and scroll back to the beginning. Then, selecting each commit, in turn, will show the diff of that commit vs the previous one.

Good luck!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download