Skip to content

Instantly share code, notes, and snippets.

@shanegray
Created March 15, 2015 18:08
Show Gist options
  • Save shanegray/5fa6cdaf5be4179f8140 to your computer and use it in GitHub Desktop.
Save shanegray/5fa6cdaf5be4179f8140 to your computer and use it in GitHub Desktop.
[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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment