我想一个新的本地分支product-0.2
推送到偏远地方已经存在具有相同名称的标签(但分支本身不存在)混帐推本地分支具有相同名称的远程标签
git push -v --tags --set-upstream origin product-0.2:product-0.2
Pushing to https://****@github.com/mycompany/product.git
error: src refspec product-0.2 matches more than one.
error: failed to push some refs to 'https://****@github.com/mycompany/product.git'
与相同:
git push origin product-0.2:/refs/heads/product-0.2
虽然周围工作的其他方式,如创建一个分支product-0.1
,在其上提交,然后应用标签product-0.1
。
有些人通过在本地删除冲突标签来解决此问题,然后推送分支,然后检索远程标签,但看起来很麻烦且容易出错。
如何以最小的烦恼创建我的分支?
感谢您的输入
尝试'refs/heads/product-0.2:refs/heads/product-0.2',即不带前导斜杠,并且在本地提供完整的refspec。 – knittl 2012-02-21 14:22:47
可以试试git push origin产品-0.2:产品-0.2 – vpatil 2012-02-21 14:48:07