You put the directory somewhere (eg. usb drive) and hope someone enters the directory and executes a git command.
That said, I also don't actually put "." in my path, though this is mainly so I can avoid heisenbugs rather than a security concern...
SL(6) Games Manual SL(6)
NAME
sl - display animations aimed to correct users who acci-
dentally enter sl instead of ls.