I've got a unix-shell script that's supposed to work on nix machines. This doesn't run on OS X however, due to "cp" command not defined. Changing it to "copy" didn't help.
git log -1 --pretty=format:"%h" | xargs -I %id% git diff-tree --no-commit-id --name-only -r %id% | xargs -I % cp --parents % upd/
The script should make a copy of files changed in last git commit.