From 583af04e564deee71883051338106b941620dba0 Mon Sep 17 00:00:00 2001 From: Danielle McLean Date: Mon, 3 Oct 2016 12:44:37 +1100 Subject: [PATCH] Initial commit, not a lot to it yet --- home/.gitconfig | 11 +++++++++++ home/.githooks/post-commit | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 home/.gitconfig create mode 100755 home/.githooks/post-commit diff --git a/home/.gitconfig b/home/.gitconfig new file mode 100644 index 0000000..c7d71ca --- /dev/null +++ b/home/.gitconfig @@ -0,0 +1,11 @@ +[include] + path = .gitconfig.local + +[alias] + d = diff + l = log --graph --oneline --decorate --all + st = status --short + shove = "!f() { git push ${1:-origin} :; }; f" + +[commit] + gpgsign = true diff --git a/home/.githooks/post-commit b/home/.githooks/post-commit new file mode 100755 index 0000000..6468f60 --- /dev/null +++ b/home/.githooks/post-commit @@ -0,0 +1,11 @@ +#!/usr/bin/env zsh + +chmod a-x $0 + +msg="$(git log -n 1 --pretty=format:'%s%n%n%b')" +guilt="$(git guilt HEAD~1 HEAD)" +what="$(curl http://whatthecommit.com/index.txt)" + +git commit --no-verify --amend -m $msg$'\n\n'$guilt$'\n\n'$what + +chmod a+x $0