summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-11-18 22:17:55 -0500
committerKyle Meyer <kyle@kyleam.com>2014-11-18 22:17:55 -0500
commit96bc6b11c883ad8db78f91d4e8036cfd1de1b279 (patch)
tree4ec50d0e261f1c8cd06a5577c6d1c2691031bc43
parent59a404234d5e5bf0bd336ae92bc009d18cf8c3a6 (diff)
downloademacs.d-96bc6b11c883ad8db78f91d4e8036cfd1de1b279.tar.gz
Add magit-push-head command
-rw-r--r--lisp/init-git.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
index 0a033d4..8cfa317 100644
--- a/lisp/init-git.el
+++ b/lisp/init-git.el
@@ -76,6 +76,13 @@ requiring confirmation.
(let ((remote (magit-read-remote "Remote")))
(magit-run-git-async "push" "-v" remote "--all")))
+(defun km/magit-push-head ()
+ "Push current branch to same name on remote.
+\n(git push REMOTE HEAD)"
+ (interactive)
+ (let ((remote (magit-read-remote "Remote")))
+ (magit-run-git-async "push" "-v" remote "HEAD")))
+
(defun km/magit-log-all-branches (range &optional args files)
(interactive (magit-log-read-args t))
(add-to-list 'args "--all")
@@ -154,6 +161,8 @@ START-POINT set to the current branch.
?u "Auto commit" 'km/magit-auto-commit)
(magit-define-popup-action 'magit-push-popup
?a "Push all" 'km/magit-push-all)
+ (magit-define-popup-action 'magit-push-popup
+ ?h "Push HEAD" 'km/magit-push-head)
(magit-define-popup-action 'magit-log-popup
?a "All branches" 'km/magit-log-all-branches)
(magit-define-popup-action 'magit-branch-popup