Skip to content

Instantly share code, notes, and snippets.

View Florent2's full-sized avatar

Florent Guilleux Florent2

View GitHub Profile
@Florent2
Florent2 / pre-commit
Created August 21, 2015 11:55
Git pre commit to abort commit if there are untracked files in the repository
if [[ -n $(git ls-files --other --exclude-standard) ]];
then
echo "commit aborted, there are untracked files!"
exit 1
else
exit 0
fi
puts header_strings.split(" | ").map { |word| "-" * word.size }.join " | "