Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to do a 'git log' in the Windows Git Gui?

I just used the Git Gui to clone a local repo from GitHub, and then I checked out a certain branch. I now want to see the equivalent of doing a git log -50, but can't seem to find anything in the menu options or on the main screen:

enter image description here

How can I see the commit history/data for the last, say, 50 changes?

like image 337
smeeb Avatar asked Sep 10 '14 13:09

smeeb


People also ask

How do I view git log in Windows?

The command for that would be git log -n where n represents the number up to which commit you to want to see the logs.

How do I use git log?

The git log command displays a record of the commits in a Git repository. By default, the git log command displays a commit hash, the commit message, and other commit metadata. You can filter the output of git log using various options.


2 Answers

That GUI isn't just for Windows, it's the standard git-gui that ships with Git.

In any case, git-gui itself doesn't show log information. It's for creating new commits, managing branches, etc. The companion program gitk visualizes the commit graph and also contains git log-like information.

You can launch gitk from git-gui using something like Repository → Visualize master's History in the menu (or, if you prefer, Visualize All Branch History). Alternatively, you can launch it from the command line. I generally want to see all branches, so I use gitk --all.

like image 127
Chris Avatar answered Sep 28 '22 01:09

Chris


Here are different options (the 3 first ones from command line):

  • gitk

  • or git-gui, then Repository > Visualize master's History, as mentioned by Chris

  • Install Git-webui from https://github.com/alberthier/git-webui and create a script in the PATH to call it quickly. On Windows I created gitweb.bat containing:

    python "D:/Documents/software/____PORTABLE/git-webui-master/release/libexec/git-core/git-webui"
    

    enter image description here

  • Use a tool like SourceTree. Note: you have to create an Atlassian or Bitbucket account first even if you want to just use it locally without any repo online (I find this annoying).

    enter image description here

like image 45
Basj Avatar answered Sep 28 '22 01:09

Basj