Simplest workflow on email git commit in Emacs (No magit needed)

  |   Source

Sometimes I just want to email my trivial patch to the original author and forget it. In this case "github fork" or "git format-patch" is too heavy weight for me.

So here is the simplest workflow I can figure out:

  • Step 1, command "M-x vc-dir" whose hotkey is "C-x v d"
  • Step 2, command "M-x git-print-log" whose hotkey is "C-x v l"
  • Step 3, Move focus to the specific commit and run command "M-x log-view-diff" whose hotkey is "d".
  • Step 4, Yank the commit/diff
  • Step 5, Compose new email (command "M-x compose-mail" whose hotkey is "C-x m")
  • Step 6, Make sure the subject of email start with "[PATCH]". See this patch sumbit guide for reasons.
  • Step 7, Paste the content of commit/diff into email body.
  • Step 8, Send the email by command "M-x message-send-and-exit" whose hotkey is "C-c C-c"

Please note:

  • Step 1 is usually necessary unless you only need the diff of current file.
  • Step 2 and step 3 could be replaced with command "M-x vc-diff" or hotkey "C-x v =" if you want to email the diff of work directory.
Comments powered by Disqus