Skip to content

Instantly share code, notes, and snippets.

@legumbre
Created February 16, 2012 23:12
Show Gist options
  • Save legumbre/1848651 to your computer and use it in GitHub Desktop.
Save legumbre/1848651 to your computer and use it in GitHub Desktop.
github friendly commit messages in magit
;; github-friendly commit messages as per:
;; https://github.com/blog/926-shiny-new-commit-styles
(add-hook 'magit-log-edit-mode-hook
(lambda ()
;; highlight too-long commit summary
(set (make-local-variable 'whitespace-line-column) 50)
(set (make-local-variable 'whitespace-style) '(face lines-tail))
(whitespace-mode 1)
;; autofill longer explanatory text
(setq fill-column 72)
(auto-fill-mode 1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment