How to copy all changed files from the last commit in git cp -pv --parents `git diff --name-only HEAD^` ../ HEAD^ - last commit ../ - directory to copy files Tags: githowto