Skip to content

Instantly share code, notes, and snippets.

@davebarnwell
Created July 27, 2017 11:04
Show Gist options
  • Save davebarnwell/08cce0dd0a32dc1c0a5e833b535c5a2f to your computer and use it in GitHub Desktop.
Save davebarnwell/08cce0dd0a32dc1c0a5e833b535c5a2f to your computer and use it in GitHub Desktop.
Export/Copy the current git branch as pure files to a directory path
#!/usr/bin/env bash
TARGET_DIR=~/temp_dir git archive --format=tar HEAD | (cd $TARGET_DIR && tar xf -)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment