diff --git a/magit.el b/magit.el index c6893c46..ba9da76e 100644 --- a/magit.el +++ b/magit.el @@ -687,6 +687,7 @@ pushed. (define-key magit-log-mode-map (kbd "RET") 'magit-show-commit) (define-key magit-log-mode-map (kbd "R") 'magit-revert-commit) (define-key magit-log-mode-map (kbd "P") 'magit-pick-commit) + (define-key magit-log-mode-map (kbd "C") 'magit-checkout-commit) (define-key magit-log-mode-map (kbd "q") 'magit-quit)) (defvar magit-log-mode-hook nil) @@ -718,6 +719,10 @@ pushed. (interactive) (magit-run "git" "cherry-pick" "--no-commit" (magit-commit-at-point))) +(defun magit-checkout-commit () + (interactive) + (magit-run "git" "checkout" (magit-commit-at-point))) + (defun magit-show-commit () (interactive) (let ((commit (magit-commit-at-point))