Skip to content

Instantly share code, notes, and snippets.

@jondeandres
Created March 26, 2013 14:48
Show Gist options
  • Save jondeandres/5245921 to your computer and use it in GitHub Desktop.
Save jondeandres/5245921 to your computer and use it in GitHub Desktop.
(defun copy-buffer ()
"Copy buffer to clipboard"
(clipboard-kill-ring-save (point-min) (point-max)))
(defun git-changelog ()
(interactive)
(shell-command "git --no-pager log --no-merges --pretty=format:'- %s' `git describe --abbrev=0 --tags`.." "*changelog*")
(switch-to-buffer "*changelog*")
(copy-buffer))
(define-key global-map "\C-cc" 'git-changelog)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment