Skip to content

Instantly share code, notes, and snippets.

@adambutler
Last active August 29, 2015 14:25
Show Gist options
  • Save adambutler/68f14abc2408952db479 to your computer and use it in GitHub Desktop.
Save adambutler/68f14abc2408952db479 to your computer and use it in GitHub Desktop.
whatthefuckhaveibeenworkingon.sh

example

Install

Add the whatthefuckhaveibeenworkingon function into your .zshrc / .bashrc file.

Usage

whatthefuckhaveibeenworkingon
#!/bin/bash
whatthefuckhaveibeenworkingon() {
LOG=~/Sites/gitlog.tmp
rm -f $LOG
touch $LOG
for dir in ~/Sites/*; do
if [[ -d $dir ]] && [[ -d $dir/.git ]]
then
cd $dir;
git log --pretty=format:"%ad - %h - $(pwd | sed 's/\/Users\/adambutler/~/g') --- %s" --date=iso --reverse --all --author="Adam Butler" >> $LOG
fi;
done
less -f ~/Sites/gitlog.tmp | sort -r | sed 's/\ \+0100//g' | more
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment