I am trying to push a new local branch of product-0.2 to the remote one where there is already a tag with the same name (but the branch itself does not exist)
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'
Same:
git push origin product-0.2:/refs/heads/product-0.2
Although another way of working, for example, create a product-0.1 branch, commit to it, then apply the product-0.1 tag.
Some people work around this by deleting the conflicting tag locally, then push the branch, then retrieve the remote tag, but it seems cumbersome and error prone.
How can I create my branch with minimal clutter?
Thank you for your input.
git git-branch
youri Feb 21 2018-12-21T00: 00Z
source share