summaryrefslogtreecommitdiff
path: root/lisp/init-git.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-01-26 01:59:44 -0500
committerKyle Meyer <kyle@kyleam.com>2014-01-26 01:59:44 -0500
commit7869360008d87ca4b459c703f4894625dd8181cc (patch)
treeb0f3f50ae2c309056883e03848abb3e1e4cb9b1e /lisp/init-git.el
parent47e1d90700105f6b0f0550d7632a22b3fe81acb9 (diff)
downloademacs.d-7869360008d87ca4b459c703f4894625dd8181cc.tar.gz
Follow Purcell's emacs.d structure
User init files are added using provide/require. https://github.com/purcell/emacs.d
Diffstat (limited to 'lisp/init-git.el')
-rw-r--r--lisp/init-git.el27
1 files changed, 27 insertions, 0 deletions
diff --git a/lisp/init-git.el b/lisp/init-git.el
new file mode 100644
index 0000000..2f9316d
--- /dev/null
+++ b/lisp/init-git.el
@@ -0,0 +1,27 @@
+(require 'git-annex)
+
+(setq git-annex-commit nil)
+
+(require 'magit)
+
+(defun km/magit-auto-commit ()
+ "Commit all changes with \"auto\" commit message.
+Useful for non-source code repos (e.g., Org mode note files)."
+ (interactive)
+ (magit-run-git "commit" "--all" "--message=auto"))
+
+(magit-key-mode-insert-action 'committing
+ "u" "Auto commit" 'km/magit-auto-commit)
+
+;; http://whattheemacsd.com/setup-magit.el-01.html
+(defadvice magit-status (around magit-fullscreen activate)
+ ad-do-it
+ (delete-other-windows))
+
+(setq magit-restore-window-configuration t)
+
+(setq magit-default-tracking-name-function 'magit-default-tracking-name-branch-only)
+
+(setq magit-log-show-margin nil)
+
+(provide 'init-git)