Skip to content

Instantly share code, notes, and snippets.

@AleenaCodes
Last active July 15, 2020 20:20
Show Gist options
  • Save AleenaCodes/c81b18a494f5f6e2a8005b06b85c2c7f to your computer and use it in GitHub Desktop.
Save AleenaCodes/c81b18a494f5f6e2a8005b06b85c2c7f to your computer and use it in GitHub Desktop.
GIF Git Hook

This requires imgcat to be installed

  • Download the GIFs provided or select your own (make sure the file names are consecutive numbers)
  • Navigate into the git hooks folder (under .git/hooks in the repo) and create a file called post-commit
  • Add the following into the file
#!/bin/sh

echo <message>
imgcat <filepath where you put the GIFs folder>/GIFs/$((1 + RANDOM % <number of GIFs>)).gif

e.g. using the provided folder of GIFs and putting that into my Downloads folder

#!/bin/sh

echo Great job on that commit
imgcat ~/Downloads/GIFs/$((1 + RANDOM % 10)).gif
@AleenaCodes
Copy link
Author

AleenaCodes commented Jan 31, 2020

GitHookFullGIF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment