2014-02-20 110 views
0

我想從我的混帳回購單個文件解壓縮,像這樣......爲什麼運行git歸檔時出現「remote:fatal:path not found:HEAD」錯誤?

$ git archive --remote=red-git:/opt/red-git/RED-puppet.git development HEAD:usr/local/scripts/apply.sh | tar -xvf - 

...但它不工作。我收到此錯誤消息。

remote: fatal: path not found: HEAD:usr/local/scripts/apply.sh 
remote: git upload-archive: archiver died with error 
fatal: sent error to the client: git upload-archive: archiver died with error 
tar: This does not look like a tar archive 
tar: Exiting with failure status due to previous errors 

我知道有一噸的問題,並回答有關如何提取混帳, 單一的文件,但他們都沒有能夠向我解釋爲什麼我收到錯誤:

remote: fatal: path not found: HEAD:usr/local/scripts/apply.sh 

我知道shell腳本是存在的,因爲我可以做到這一點...

$ git archive --remote=red-git:/opt/red-git/RED-puppet.git development | tar -xvf - | grep apply.sh 
... 
usr/local/scripts/apply.sh 

回答

0

敲我的HEAD後靠在牆上,多試錯I C ame on the command line that do the trick:

git archive --remote=red-git:/opt/red-git/RED-puppet.git development usr/local/scripts/apply.sh | tar -xvf - 

HEAD:。好我真的不知道這意味着什麼。 :)

相關問題