Skip to content

Instantly share code, notes, and snippets.

@rip747
Created August 15, 2009 18:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rip747/168418 to your computer and use it in GitHub Desktop.
Save rip747/168418 to your computer and use it in GitHub Desktop.
exportfiles for git
exportfiles = !sh -c 'git diff $0 --name-only | "while read files; do mkdir -p \"$1/$(dirname $files)\"; cp -vf $files $1/$(dirname $files); done"'
@iGhost
Copy link

iGhost commented Oct 2, 2013

That is awesome, but it does not handle paths with spaces.
Any improvements of that problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment