How do I add a custom command to gitk's menu shown when right-clicking a commit? The command I want to add specifically is git revert
, but I'm hoping for a generic solution.
Asked
Active
Viewed 157 times
0

Cactus
- 27,075
- 9
- 69
- 149
2 Answers
1
gitk is a tcl script. You could simply add commands to it (assuming you know a little about tcl).

cforbish
- 8,567
- 3
- 28
- 32
-
I could see doing that as a last resort. But if it's possible to do it via configuration, I'd rather do that. So let's wait a bit to see if someone can tell if there's a config option to do this. – Cactus Sep 11 '13 at 03:02
-
I agree with you it would be nice just to plug a script in as I do not know tcl very well. – cforbish Sep 11 '13 at 03:23
1
A menu item for git-revert
was added recently to gitk:
commit f74455ab216bdc4f21a733f75ddd6974634c5df1
Merge: 8d97506 76bf6ff
Author: Junio C Hamano <gitster@pobox.com>
Date: Mon May 13 07:51:41 2013 -0700
[...]
gitk: Add menu item for reverting commits
Just clone the git sources from git://git.kernel.org/pub/scm/git/git.git

Cactus
- 27,075
- 9
- 69
- 149

Slaven Rezic
- 4,571
- 14
- 12