Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
#!/usr/bin/env bash
# git-takeout: take one or more files out of the last commit
set -eo pipefail
usage() {
echo "usage: git takeout <file> [file ...]"
exit
}
[[ -z "${1}" ]] && usage
git reset --soft HEAD^
git reset HEAD -- "${@}"
git commit -c ORIG_HEAD