git获取干净代码(不带版本控制文件)

Use git archive; something like:

git archive --format=tar --remote=$REPO $BRANCH | tar xf -

This command gets only the source tree with no git metadata (i.e., no .git subdirectory).  It is also very fast.  The command above writes the source code into the current directory; to write it into a subdirectory add the option --prefix=subdir/.

你可能感兴趣的:(tree,git,command,branch,archive)