Cat 파일 처리 헤더?

Cat 파일 처리 헤더?

Git에서 단일 파일을 다운로드하기 위해 다음 명령을 실행하고 있습니다.

git archive --remote=ssh://host/pathto/repo.git HEAD README.md

파일의 내용은 터미널로 전달되며 readme 파일의 내용을 보기 전에 다음과 같은 헤더 정보가 있습니다.

pax_global_header00006660000000000000000000000064131063477050014520gustar00rootroot0000000000000052 comment=502c8004562eab49c105b2e294d8806c735c13a1 README.md000066400000000000000000000002771310634770500123510ustar00rootroot00000000000000

내 최종 목표는 다음과 같이 파일을 로컬로 리디렉션하는 것입니다.

git archive --remote=ssh://host/pathto/repo.git HEAD README.md > README.md

헤더 텍스트가 포함되지 않은 파일이 되도록 헤더 정보를 처리하려면 어떻게 해야 합니까?

답변1

나는 배관이 tar xvf -문제를 해결했다는 것을 알았습니다.

git archive --remote=ssh://host/pathto/repo.git HEAD README.md  |  tar xvf -

관련 정보