Skip to content

Instantly share code, notes, and snippets.

@kytrinyx
Created January 8, 2013 23:26
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kytrinyx/4489037 to your computer and use it in GitHub Desktop.
Save kytrinyx/4489037 to your computer and use it in GitHub Desktop.
Take a snapshot of yourself on every commit.

Git Commit Snapshots

Snap a picture of yourself on every commit.

Probably Mac OS X only, I haven't looked into others.

$ brew install imagesnap
$ git config --global init.templatedir '~/.git_template'
$ chmod +x post-commit
$ mkdir -p .git_template/hooks
$ mv post-commit .git_template/hooks/post-commit
#!/bin/sh
imagesnap -q $HOME/.gitshots/$(date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s")_$(basename `pwd`).jpg &
@seanhotw
Copy link

$(date -j -f "%a %b %d %T %Z %Y" "date" "+%s") doesn't quite work for me, I changed to $(date +%Y-%m-%d-%H%M%S) instead.

And .gitshots folder need to be created manually or there will be an error.

@jkthorne
Copy link

jkthorne commented Feb 1, 2013

check out lolcommits
gem i lolcommits

@saulius
Copy link

saulius commented Feb 22, 2013

If you are squashing like 30 commits - prepare for a photoshoot!

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