Problem description
If the tag and heads have the same name, an error will be reported
error: dst refspec v0. 10.2 matches more than one
Problem analysis
refs/heads/*
is the branch name refs/tags/*
is the tag name refs/remotes/*
is the remote track name
When naming heads, it generally uses main, master, that is refs/heads/Master
, refs/heads/main
when naming tags, it usually uses v0.1, v0. 2, i.e. refs/tags/v1.0
When you execute git push origin master
, because Master
is generally only in heads, not in tags, GIT can directly find the branch you want to push.
But here:
git LS remote
the results are as follows:
61d10100326130d2eceee85167d5ec2d9970ebbe refs/heads/seq_task
4ee9724f3a6a47134483e4955c688f4f34432ee0 refs/heads/simulastsharedtask
83e615d66905b8ca7483122a37da1a85f13f4b8e refs/heads/v0.10.2
bdf09e1321a77252835550e84d73ad1bb3f3173c refs/heads/xlmr_benchmark
3e5a2739bce92b2516d060959a1aa3dd51d221dc refs/tags/v0.10.0
8a0b56efeecba6941c1c0e81a3b86f0a219e6653 refs/tags/v0.10.1
83e615d66905b8ca7483122a37da1a85f13f4b8e refs/tags/v0.10.2
Twice v0.10.2
, corresponding to tags and heads respectively, so an error is reported.
Solution:
-
- change the name of the branch’s heads or tags (the change method is Google). Push
git push origin refs/heads/Main: refs/tags/V1 with the full name of the branch 2
Reference resources:
Read More:
- How to Solve Git Push Error: error: src refspec v3.3.04.1000 matches more than one
- [Solved] Git Common Error: error: src refspec xxx does not match any/error: failed to push some refs to
- error: src refspec master does not match any. [How to Solve]
- error: src refspec master does not match any [How to Solve]
- error: src refspec master does not match any [How to Solve]
- [Solved] Error: SRC refspec master doors not match any
- [Solved] Git error: refname refs/heads/master not found
- [Solved] Zsh: one of the solutions to parse error near ‘\n’
- Error husky > pre-commit (node v10.16.3) is reported when git commit is submitted
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- [Solved] Android Project error: import android.support.v4 (V7). App.activitycompat
- [Solved] IDEA Git Update Error: Master has no tracked branch
- Git fatal: No configured push destination. Either specify the URL from the command-line or co
- [Solved] Git Push Error: &fatal: the remote end hung up unexpectedly
- Git Push Error: failed to push some refs to ‘[email protected]:
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- How to Fix Error Cannot find command ‘git‘ – do you have ‘git‘ installed and in your PATH?
- Springboot + Git Error: detached HEAD [How to Solve]
- [Solved] fatal: not in a git directory Error: Command failed with exit 128: git
- [Solved] Git error: inflate: data stream error (invalid block type) error: corrupt loose object