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.

有帮助吗?

解决方案

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

其他提示

gitk is a tcl script. You could simply add commands to it (assuming you know a little about tcl).

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top