Resolving git-gc error on Mac

During today's maintenance run of git-gc on our Mac hosted repo I encountered screenfulls of nasty fatal error messages - but the last two were a clue to the root cause:

fatal: Unable to create temporary file: Too many open files
error: failed to run repack

This related post helped me find a quick cure which involved simply bumping the ulimit up temporarily.

# ulimit -n 10024
> git gc

Easy fix for a potentially bad day.