我試圖用git subtree add
向我的項目添加一個回購(稱爲牛)。特別是,我想添加分支stable
(這不是master
分支)。我想:從分支添加git子樹
git subtree add -P cow https://github.com/geoffryan/cow.git stable
但這返回的錯誤
'stable' does not refer to a commit.
我也試過:
git subtree add -P cow https://github.com/geoffryan/cow.git cow/stable
'cow/stable' does not refer to a commit.
和:
git subtree add -P cow https://github.com/geoffryan/cow.git ca26d248a12c21264e32a2c212381cafb578c9fb
'ca26d248a12c21264e32a2c212381cafb578c9fb' does not refer to a commit.
哈希是最新提交在stable
分支中。我在網上看到的使用示例全部使用master
進行提交,是否可以在非主分支上使用subtree add
?
這樣做!謝謝:) –
但是,污染父母回購與一堆不必要的承諾從牛回購... -/ –
哪些是不需要的承諾? – gipi