diff options
author | Kyle Meyer <kyle@kyleam.com> | 2013-10-29 19:25:57 -0400 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2013-10-29 19:35:49 -0400 |
commit | 045906bffbdaf2fa337b6a8e67a4f944f22e8edc (patch) | |
tree | 8dbfd42f239a97fc1bfe3a93b3d243138cc7677e | |
parent | 0d35b5a4ad23f8060da9fab46015a653fef2c92b (diff) | |
download | emacs.d-045906bffbdaf2fa337b6a8e67a4f944f22e8edc.tar.gz |
Function for quick amend with magit
-rw-r--r-- | init/km-func.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/init/km-func.el b/init/km-func.el index bf98552..700bb42 100644 --- a/init/km-func.el +++ b/init/km-func.el @@ -163,3 +163,13 @@ KILLARG." (other-window 1)) (global-set-key (kbd "C-c s") 'km/swap-windows) + +;; http://whattheemacsd.com/setup-magit.el-05.html +(defun km/magit-just-amend () + (interactive) + (save-window-excursion + (magit-with-refresh + (shell-command "git --no-pager commit --amend --reuse-message=HEAD")))) + +(eval-after-load "magit" + '(define-key magit-status-mode-map (kbd "C-c C-a") 'km/magit-just-amend)) |