我正在尝试使用git subtree add
. 特别是,我想添加分支stable
(不是master
分支)。我试过了:
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
在非master分支上使用?