This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://blog.extracheese.org/2010/05/the-tar-pipe.html | |
SRC=existing-source-controlled-proj | |
DEST=copy-of-proj-with-no-git-data | |
# on Linux and WSL use gnu tar exclude VCS to prevent copying the git data | |
(cd ${HOME}/depot/${SRC} && tar --exclude-vcs cf - .)|(cd ${HOME}/depot/${DEST} && tar xvfp -) | |
# on Mac the --exclude-vcs is not available - can add --exclude .git | |
(cd ${HOME}/depot/${SRC} && tar --exclude='.git' cf - .)|(cd ${HOME}/depot/${DEST} && tar xvfp -) |