2012-09-21 25 views
0

我想用git生成捆綁包,但出於某些重要原因,我需要它在標準輸出上而不是文件中。 在git bundle有替代命令嗎?標準輸出上的Git捆綁

回答

1

使用-作爲文件參數git bundle

$ git bundle create - HEAD~10.. > outfile  
Counting objects: 83, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (67/67), done. 
Writing objects: 100% (68/68), 8.42 KiB, done. 
Total 68 (delta 55), reused 0 (delta 0) 
$ file outfile 
outfile: Git bundle 
$ ls -l outfile 
-rw-r--r-- 1 author author 8789 2012-09-21 15:20 outfile 
+0

在我的Git版本1.7.10.1 「混帳捆綁創建 - 」 創建一個名爲 - 在標準輸出,但沒有 「」。你使用什麼版本? – Joker

+0

'git version 1.7.4.1'。以上輸出是來自終端的實際粘貼,我的用戶名更改爲「作者」。 – user4815162342

+0

同樣適用於'git版本1.7.12'。你究竟如何運行它? – user4815162342