Created
October 30, 2013 12:09
-
-
Save joeyates/7231567 to your computer and use it in GitHub Desktop.
Check out the nth commit to master in a git repository.
This command can be used during presentation to skip through the history of a repo.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git checkout master | |
SHA1=`git rev-list HEAD | tail -n $1 | head -n 1` | |
git checkout $SHA1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment