summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-git.el7
1 files changed, 7 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 8b3fe99..65943d3 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -13,11 +13,18 @@ Useful for non-source code repos (e.g., Org mode note files)."
(interactive)
(magit-run-git "commit" "--all" "--message=auto"))
+(defun km/magit-push-all ()
+ "Push all branches."
+ (interactive)
+ (let ((remote (magit-read-remote "Remote")))
+ (magit-run-git-async "push" "-v" remote "--all")))
(eval-after-load 'magit
'(progn
(magit-key-mode-insert-action 'committing
"u" "Auto commit" 'km/magit-auto-commit)
+ (magit-key-mode-insert-action 'pushing
+ "a" "Push all" 'km/magit-push-all)
(diminish 'magit-auto-revert-mode)))
;; http://whattheemacsd.com/setup-magit.el-01.html