Aside from the standard stuff I have:
# Usage: git whatsnew <other_branch>
# Show commits that are in the current branch,
# but not in <other_branch>. Great for an
# instant changelog.
whatsnew = !sh -c 'git shortlog --format=\"%h %s\" $1..HEAD' -
# Usage: git omgwtfbbq
# abort/reset/clean/etc everything back to HEAD.
# DESTRUCTIVE! Handy if you get git into a
# really odd state, during a merge, though...
omgwtfbbq = !sh -c '~/.bin/git-omgwtfbbq'
# and in ~/.bin/git-omgwtfbbq
#!/bin/bash
# Get confirmation from user
read -p "This will erase any work done and reset to HEAD. Continue? [yN] " -n1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
echo ''
# Reset everything
git clean -f && (git rebase --abort || git reset --hard)
[edit: formatting]