#!/bin/sh

# To use this, copy to .git/hooks/pre-commit

esc=`echo -e '\033'`

# Prevent commit if there untracked files that are not in .gitignore
untracked=`git status -u | grep '^# Untracked files:$'`
if [ "$untracked" != "" ] ; then
	git status ; echo "${esc}[31;1mAdd untracked files first!${esc}[0m" ; exit 1
fi
