Skip to content

Instantly share code, notes, and snippets.

View cdunham's full-sized avatar

Curtis Dunham cdunham

View GitHub Profile
#!/bin/sh
set -e
# git snap: (re-)commit a snapshot of exactly another commit
# an alternative to 'pick' in git rebase -i: use x git snap <sha>
if [ -z "$1" ]; then
echo "usage: git snap <commit sha1>"
exit
fi
case `git cat-file -t $1` in