Git – Interactive log / navigating between commits

938 Views Asked by At

I'm trying to find a comprehensive list of tortoise git functionality for the git command line (cmd version, not bash). I'm stuck at graphical log viewing. In tortoiseGit I can

  1. Open log of repo
  2. Navigate between commits and browse files in each commit
  3. Open diff directly from log

Are there any command line tools, scripts or aliases for that?

I was amazed that git contains interactive staging dialog and I'm looking for something similar.

1

There are 1 best solutions below

1
G. Sliepen On

The upstream git package comes with a graphical tool called gitk, which does exactly what you want. However, the command line tool does not offer an interactive way to browse the commits. Instead, you have to use separate commands to do this:

git log

This will show you a log. Note that each log entry starts with the commit identifier. You can then view the diff of that commit using:

git show <identifier>

To browse the files as they were at a specific commit, just check out that commit:

git checkout <identifier>

After you are done, you can go back with git checkout master (assuming you are on the master branch).