Problems encountered
Create a project and associate it to a git remote warehouse
$ git init
$ git remote add origin [email protected]:abeelan/vue_demo.git
$ git branch -M main
$ git push -u origin main
Execute the third line of command, and an error occurs when changing the branch name
error: refname refs/heads/master not found
fatal: Branch rename failed
Solution:
$ git init
$ git remote add origin [email protected]:abeelan/vue_demo.git
$ git add .
$ git commit -m "demo finished"
$ git branch -M main
$ git push -u origin main
To modify the branch name, you need to have a commit before you can change it.
Read More:
- [Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master
- [Solved] Git Common Error: error: src refspec xxx does not match any/error: failed to push some refs to
- [Solved] Git submits locally to the remote warehouse Error: failed to push some refs to…
- Git Push Error: failed to push some refs to ‘[email protected]:
- How to Solve Git Error: error: failed to push some refs to……
- Git Push Error: error: failed to push some refs… hint: Updates were rejected because the remote…
- [Solved] IDEA Git Update Error: Master has no tracked branch
- error: src refspec master does not match any [How to Solve]
- error: src refspec master does not match any. [How to Solve]
- Git pull and Git pull origin master Warning: Pulling without specifying how to reconcile divergent branches
- [Solved] error: failed to push some refs to ‘https://gitee.com/wangdxstudy/mygirl.git‘
- Local repository upload to remote repository error: failed to push some refs to ‘https://hub.fastgit.org/zhizhangxuezhang/ui-test.git‘
- [Solved] Error: SRC refspec master doors not match any
- HEXO D Command ERROR Deployer not found: git
- error: src refspec master does not match any [How to Solve]
- [Solved] fatal: not in a git directory Error: Command failed with exit 128: git
- [Solved] git Error: error: dst refspec v0.10.2 matches more than one
- K8S Master Initialize Error: [ERROR CRI]: container runtime is not running: output: E0812
- [Solved] CDH ipa: ERROR: Host ‘cdh-master-v02.yunes.com‘ does not have corresponding DNS A/AAAA record
- Git fatal: No configured push destination. Either specify the URL from the command-line or co