【发布时间】:2013-05-25 15:05:53
【问题描述】:
我正在尝试使用 git subtree add 向我的项目添加一个 repo(称为牛)。特别是,我想添加分支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进行提交,是否可以在非master分支上使用subtree add?
【问题讨论】:
标签: git git-subtree