#!/bin/sh output=$(find . -name '.#*' -print) if [ -n "$output" ]; then echo "unsaved Emacs files:" 1>&2 echo "$output" 1>&2 exit 1 fiHad that kind of problem a few times. :-)
Now what would be really handy are system-wide Git hooks that apply to all repositories, like ~/.gitignore complements .git/info/exclude.