Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6358393
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:21:58+00:00 2026-05-24T23:21:58+00:00

I am using gitk –all to view the git log. gitk does not display

  • 0

I am using gitk –all to view the git log. gitk does not display the sha hash for each commit. you need to manually click on the commit to view the sha hash. I want to see the sha hash and the branch name in a single view.

How to display the tag-names and branch names using the git log command.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:21:59+00:00Added an answer on May 24, 2026 at 11:21 pm

    With git log (so, not gitk), you can use the decorate option (%d) in a pretty format, for displaying the branch name (but only for commits which are the HEAD of said branches):

    alias.lgb=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches
    

    (you have to declare that alias with:

    git config --global alias.lgb "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset%n' --abbrev-commit --date=relative --branches"
    

    Then you can use it with ‘git lgb‘. Note: you can name it with a different alias.
    )

    Will give:

    * e33afe7 - (HEAD, master) fix zlib make install issue on cygwin (8 seconds ago) <VonC>
    |
    * f825f36 - add CPPFLAG option for cygwin compilation of gcc (26 hours ago) <VonC>
    |
    * 9341979 - (origin/master, origin/HEAD) update error messages for compiling gcc within cygwin (2 days ago) <VonC>
    |
    * 42d81af - copy dll in $H/usr/local/bin instead of linking when compiling in cygwin (3 days ago) <VonC>
    

    Update Git 2.2 (November 2014): see commit 9271095 from Harry Jeffery (eXeC64):

    pretty: add %D format specifier

    Add a new format specifier, ‘%D‘ that is identical in behaviour to ‘%d‘, except that it does not include the ‘ (‘ prefix or ‘)‘ suffix provided by ‘%d‘.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When using gitk, a commit can be selected in the log pane, and a
I have been using gitk and am looking for something that shows all my
I'm using Git Gui and Gitk on Windows. How do I undo a hard
I am using the command line version of Git and gitk. I want to
I'm trying to use the gitk on mysysgit. I'm not using Cygwin or MinGW
I am using 'git' to checkout chromium code by following this document: http://code.google.com/p/chromium/wiki/UsingGit And
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using C#, I need a class called User that has a username, password, active
Using jQuery, what's the best way to automatically initialize a plugin on all current
Using PHP, I'm trying to give each specific text its own variable. I believe

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.