Skip to content

Instantly share code, notes, and snippets.

@samsonjs
Created August 10, 2010 17:44
Show Gist options
  • Save samsonjs/517663 to your computer and use it in GitHub Desktop.
Save samsonjs/517663 to your computer and use it in GitHub Desktop.
#!/bin/sh
FILENAME="$1"
git checkout $(git rev-list -n1 HEAD -- "$FILENAME")^ "$FILENAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment