Skip to content

Instantly share code, notes, and snippets.

View shanegray's full-sized avatar

Shane Gray shanegray

View GitHub Profile
[alias]
l = log --oneline --abbrev-commit --abbrev=4 -20
s = status -sb
days = "!days() { git log --pretty=format:%cd --date=short | uniq; }; days"
stat = "!stat() { echo -n Number of revisions:; git log --oneline | wc -l; echo -n Number of developers:; git shortlog -s | wc -l; echo -n Number of days:; git days | wc -l; echo -n The working directory:; du -h -s --exclude=.git; echo -n The git directory:; du -h -s .git; echo -n Number of files in the working dir:; git ls-files | wc -l; }; stat"
snap = "!snapshot() { COMMENT=wip; if [ \"$*\" ]; then COMMENT=\"$*\"; fi; git add -A; git commit -m \"$COMMENT\"; }; snapshot"
[push]
default = simple