Skip to content

Instantly share code, notes, and snippets.

@snim2
Created February 22, 2015 20:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snim2/159c0059f2f7ba5fe519 to your computer and use it in GitHub Desktop.
Save snim2/159c0059f2f7ba5fe519 to your computer and use it in GitHub Desktop.
Instructions on how to create an animated git of a shell session

How to produce an animated gif

Step 1: Record a terminal session

$ ttyrec myrecording.tty

Press Ctrl+d when finished.

Step 2: Convert .tty file to a series of gifs

Make sure that tty2gif is on your $PATH.

$ tty2gif typing myrecording.tty

Replays each keypress and takes a screenshot. Don't touch the terminal whilst this is running!

Step 3: Combine gifs into single file

$ convert -delay 10 -loop 0 step*.gif -delay 500 $(ls -1 step*.gif | tail -1) -layers Optimize final.gif

Step 4: Tidy up

Rename final.gif to something more meaningful. Remove all step*.gif files. Add link in README.md. Commit.

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