3

I have Git for Windows installed. When I right click on a project and select Git History I get the Gitk window, but every time I do so I need to set the view to see all branches. Even when I edit the view and set it to Remember, I still do not get all branches on subsequent visits to Gitk.

Alternatively, I can open the Bash window and type gitk --all for the same result.

Both are inconvenient and I'd like to make the default behavior of rght clicking and selecting Git History to show gitk --all.

How can this be accomplished?

Thanks.

Ralph M. Rivera
  • 769
  • 3
  • 12
  • 25
  • Related thread: https://stackoverflow.com/questions/60147050/any-way-to-control-the-default-view-of-gitk – Shi Jul 24 '22 at 14:24

2 Answers2

0

Modify registry of that context menu entry to add argument "--all"

linquize
  • 19,828
  • 10
  • 59
  • 83
0

This worked for me:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Classes\*\shell\Open with &gitk --all\command]
@="C:\\Users\\rofro\\scoop\\shims\\gitk.exe --all \"%1\""

[HKEY_CURRENT_USER\Software\Classes\directory\Background\shell\Open with &gitk --all\command]
@="C:\\Users\\rofro\\scoop\\shims\\gitk.exe --all \"%V\""
rofrol
  • 14,438
  • 7
  • 79
  • 77