When you use the git bash command to upload items to github, you always encounter some errors that cannot be resolved.
Here is a problem I encountered
error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:hahaha/ftpmanage.git'
Question content:
Error: SRC ReFSPEC master does not match any
Error: Failed to push some references to ‘git @ Github. com: HaHaa/ftpMal git’
That is, the warehouse is empty.
Solution:
Use git add xxx.py command adds all files, and then use command git commit -m “init” to commit all files,
git commit -m "init"
Then execute
git remote add origin xxxxxxxx.git
Last use
$ git push -u origin master
be accomplished.
Summary:
In fact, only the following steps are needed to upload the local project 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, and finally push the local repository project to the remote repository (that is, Github) through git push -u origin master; (if the new remote repository automatically created a README file will report an error, the solution see above).
Read More:
- [Solved] Error: SRC refspec master doors not match any
- 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
- No match for ‘operator =’ both ends of the equal sign do not match
- [Solved] Git error: refname refs/heads/master not found
- [Solved] git Error: error: dst refspec v0.10.2 matches more than one
- [Solved] CDH ipa: ERROR: Host ‘cdh-master-v02.yunes.com‘ does not have corresponding DNS A/AAAA record
- [Solved] Mac Install homebrew Error: error: Not a valid ref: refs/remotes/origin/master
- [ubuntu14.04]Tensorflow: Could not find any downloads that satisfy the requirement
- [Solved] MindSpore Error: ValueError: Minimum inputs size 0 does not match…
- [Solved] RHEL 7.6 Use yum Error: Could not contact any CDS load balancers
- Error starting vue project these dependencies were not found:create in ./src/router/modules/md.js
- K8S Master Initialize Error: [ERROR CRI]: container runtime is not running: output: E0812
- [Solved] Canal Error: CanalParseException: column size is not match,parse row data failed
- Oracle prompt text does not match format string
- [Solved] error LNK2038: Detected mismatch of “RuntimeLibrary”: The value “MDd_DynamicDebug” does not match the value “MTd_StaticDebug”
- [Solved] Eureka Startup Error: Root name (‘timestamp‘) does not match expected type EurekaApplications
- [Solved] QT cmak Compile Error: CMake Error: The source.. does not match the soused