Unable to submit successfully when pushing
error: src refspec master does not match any
error: failed to push some refs to 'https://gitee.com/xxxxxxx/cool-admin-midway.git'
The content of the question is:
Error: SRC refspec master does not match any
error: failed to push some references to ” https://gitee.com/xxxxxxx/cool-admin-midway.git ’
That is, the warehouse is empty
solution:
Use the git add XXX. Py
( git add.
add all) instruction to add all files, and then perform git commit – M “init” to commit all files,
git commit -m "init"
Then in execution
$ git remote add origin xxxxxxxx.git
Last use
$ git push -u origin master
In this way, the code can be uploaded successfully. You can see that the code is uploaded successfully in the warehouse
Summary:
In fact, you only need to do the following steps to upload local projects to GitHub
1. create a local repository (i.e. folder) and turn it into a Git repository by git init.
2. Copy the project into this folder and add it to the repository via git add . Add the project to the repository.
3. commit the project to the repository by using git commit -m "comment content".
4, after setting up the SSH key on Github, create a new remote repository by git remote add origin https://github.com/guyibang/TEST2.git Associate a local repository with a remote repository.
5. Finally, push the project from the local repository to the remote repository (i.e. Github) via git push -u origin master; (if the README file is automatically created when you create a new remote repository, it will report an error, see above for the solution).
Complete steps for uploading files locally to gitee
Git global settings:
git config --global user.name "namexxxx"
git config --global user.email "emailxxx"
Create a git repository:
mkdir test_code
cd test_code
git init
git add xxxx (to add files, git add . Add all)
git commit -m "first commit"
git remote add origin https://xxxxx.git
git push -u origin master
Read More:
- 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] Git Common Error: error: src refspec xxx does not match any/error: failed to push some refs to
- How to Solve Git Push Error: error: src refspec v3.3.04.1000 matches more than one
- [Solved] Git error: refname refs/heads/master not found
- No match for ‘operator =’ both ends of the equal sign do not match
- [Solved] git Error: error: dst refspec v0.10.2 matches more than one
- [Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master
- [Solved] CDH ipa: ERROR: Host ‘cdh-master-v02.yunes.com‘ does not have corresponding DNS A/AAAA record
- [ubuntu14.04]Tensorflow: Could not find any downloads that satisfy the requirement
- [Solved] RHEL 7.6 Use yum Error: Could not contact any CDS load balancers
- K8S Master Initialize Error: [ERROR CRI]: container runtime is not running: output: E0812
- [Solved] MindSpore Error: ValueError: Minimum inputs size 0 does not match…
- Error starting vue project these dependencies were not found:create in ./src/router/modules/md.js
- Oracle prompt text does not match format string
- [Solved] Eureka Startup Error: Root name (‘timestamp‘) does not match expected type EurekaApplications
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] Canal Error: CanalParseException: column size is not match,parse row data failed
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused