0
我有一個git克隆的存儲庫。'git pull'branch only
這個回購的目的是git log
,只要沒有git log over ssh這樣的東西。
$ git ls-remote
ac118076af0ca4c164a831b9e31b1a307747ec36 refs/heads/master
db1253eae8241aa0813d5a49880c41cd810216c2 refs/heads/production/version-2011.10
32c2dcad3133c8214c0d0e898e32b7a7a9f068cf refs/heads/release/version-2011.11
我想建立一個只讀分支僅git pull
從遠程計算機(跟蹤分支?!)。
$ git branch -tb version-2011.11 refs/heads/release/version-2011.11
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'refs/heads/release/version-2011.11' which can not be resolved as commit?
$ git checkout -tb version-2011.11 release/version-2011.11
fatal: git checkout: updating paths is incompatible with switching branches.
Did you intend to checkout 'release/version-2011.11' which can not be resolved as commit?
在未來:
- 發佈/ 2011.11將成爲生產/ 2011.11
- 主 - >發佈/版本2011.12
- 等等...
有什麼建議嗎?
但是我仍然需要一個倉庫克隆,對不對?這是相當巨大的。無論如何,謝謝你,我會嘗試。 –
你的問題的前提是你有一個存儲庫克隆。如果你只需要git log的輸出,並且你可以ssh到機器上,只要執行'ssh me @ git --git-dir =/srv/git/blah.git log' –