Emacs vc-mode doesn’t support git push

So here’s a quick function to drop in your ~/.emacs (taken from here):

(defun git-push-remote-origin ()
  "run `git push'"
  (interactive)
  (when buffer-file-name
    (shell-command "git push")
    (message "DONE! git push at %s" default-directory)
        ))

Leave a Reply

Your email address will not be published. Required fields are marked *