Skip to content

Instantly share code, notes, and snippets.

@dahlbyk
Created November 24, 2014 06:22
Show Gist options
  • Save dahlbyk/2527f98b919500cb6ae5 to your computer and use it in GitHub Desktop.
Save dahlbyk/2527f98b919500cb6ae5 to your computer and use it in GitHub Desktop.
Git Demo Aliases
# To start a demo between <start-ref> and <end-ref> (default = HEAD):
# git demo <start-ref> [<end-ref>]
# To step through commits toward <end-ref>:
# git next
[alias]
demo = !sh -c 'git update-ref DEMO_HEAD $(git rev-parse ${2-HEAD}) && git checkout -fq $1~0' -
next = !sh -c 'git checkout -fq $(git log ..DEMO_HEAD --pretty=format:"%H" | tail -n1)' -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment